Products not able to be added to cart anymore

This topic has 9 replies, 2 voices, and was last updated 7 years, 6 months ago ago by Rose Tyler

  • Avatar: blinkd
    Jay
    Participant
    April 25, 2017 at 23:30

    Recently, it’s been reported to me that customers are unable to add certain products to their shopping cart. From my own testing, it appears that this mainly affects products of the type “Simple Product”.

    The most recent updates were to WP 4.7.4, WooCommerce 3.0.4, and Royal Theme 3.0.1.

    The store is currently losing money due to this. Can you please help me ASAP. I’ve tried it with plugins deactivated.

    In the Woocommerce status page, there are several messages stating outdated Woocommerce pages. One is cart.php. Could this be the culprit?

    Please, contact administrator
    for this information.
    8 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    April 26, 2017 at 08:41

    Hello,

    Please update Ultimate Addons for Visual Composer and WPBakery Visual Composer https://www.8theme.com/download-plugins/page/2/
    The issue with outdated files will be fixed in a new theme update.

    Regards,
    Rose Tyler.

    Avatar: blinkd
    Jay
    Participant
    April 27, 2017 at 06:52

    I updated the plugins and am still not able to add variable products to the shopping cart. Can you give me a timeline on when this will be fixed? My client is complaining that this is costing them a lot of sales. Thank you.

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    April 27, 2017 at 08:07

    Hello,

    I’ve checked your site and http://prntscr.com/f1cbd1.
    The theme update will be realized in 1-2 days.

    Regards,
    Rose Tyler.

    Avatar: blinkd
    Jay
    Participant
    April 27, 2017 at 20:23

    Hello. I updated Royal to v3.0.2, but I’m still unable to add Simple Products to the shopping cart. Variable Products are able to add. Can you please take a look at it? Thank you.

    Please, contact administrator
    for this information.
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    April 28, 2017 at 10:13

    Hello,

    I sent your report to our developers. Thank you for the notice.
    I’ve activated Ajax “Add To Cart” (Theme Options -> Single Product Page). Please check add to cart on single product page now.

    Regards,
    Rose Tyler.

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    April 28, 2017 at 10:44

    Hello,

    To solve problem, please change /royal/woocommerce/single-product/add-to-cart/simple.php file to:

    <?php
    /**
     * Simple product add to cart
     *
     * @author 		WooThemes
     * @package 	WooCommerce/Templates
     * @version     3.0.0
     */
    
    if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
    
    global $woocommerce, $product;
    
    if ( ! $product->is_purchasable() ) return;
    ?>
    
    <?php
    	// Availability
    	$availability      = $product->get_availability();
    	$availability_html = empty( $availability['availability'] ) ? '' : '<p class="stock ' . esc_attr( $availability['class'] ) . '">' . esc_html( $availability['availability'] ) . '</p>';
    	
    	echo apply_filters( 'woocommerce_stock_html', $availability_html, $availability['availability'], $product );
    ?>
    
    <?php if ( $product->is_in_stock() ) : ?>
    
    	<?php do_action( 'woocommerce_before_add_to_cart_form' ); ?>
    
    	<form class="cart" method="post" enctype='multipart/form-data'>
    	 	<?php do_action( 'woocommerce_before_add_to_cart_button' ); ?>
    
    	 	<?php
    	 		if ( ! $product->is_sold_individually() )
    
    	 		/**
    			 * @since 3.0.0.
    			 */
    			do_action( 'woocommerce_before_add_to_cart_quantity' );
    
    	 			woocommerce_quantity_input( array(
    	 				'min_value' => apply_filters( 'woocommerce_quantity_input_min', 1, $product ),
    	 				'max_value' => apply_filters( 'woocommerce_quantity_input_max', $product->backorders_allowed() ? '' : $product->get_stock_quantity(), $product )
    	 			) );
    
    	 		/**
    			 * @since 3.0.0.
    			 */
    			do_action( 'woocommerce_after_add_to_cart_quantity' );
    	 	?>
    
    	 	<input type="hidden" name="add-to-cart" value="<?php echo esc_attr( $product->get_id() ); ?>" />
    
    	 	<button type="submit" name="add-to-cart" value="<?php echo esc_attr( $product->get_id() ); ?>" class="single_add_to_cart_button <?php if(etheme_get_option('ajax_addtocart')): ?>etheme-simple-product<?php endif; ?> button alt"><?php echo $product->single_add_to_cart_text(); ?></button>
    
    		<?php do_action( 'woocommerce_after_add_to_cart_button' ); ?>
    	</form>
    
    	<?php do_action( 'woocommerce_after_add_to_cart_form' ); ?>
    
    <?php endif; ?>

    Regards,
    Rose Tyler.

    Avatar: blinkd
    Jay
    Participant
    May 1, 2017 at 06:08

    Thank you very much, Rose! It look like it’s working now.

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    May 3, 2017 at 10:16

    Hello,

    You’re welcome!

    Regards,
    Rose Tyler.

  • Viewing 9 results - 1 through 9 (of 9 total)

The issue related to '‘Products not able to be added to cart anymore’' has been successfully resolved, and the topic is now closed for further responses

8theme customization service
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.