This topic has 9 replies, 2 voices, and was last updated 7 years, 7 months ago ago by Rose Tyler
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?
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.
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.
Hello,
I’ve checked your site and http://prntscr.com/f1cbd1.
The theme update will be realized in 1-2 days.
Regards,
Rose Tyler.
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.
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.
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.
Thank you very much, Rose! It look like it’s working now.
Hello,
You’re welcome!
Regards,
Rose Tyler.
Tagged: cart, products, woocommerce, wordpress
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