Skip Navigation

Impossible to add more than one Item to cart, on the Shop page, if styled with Woocommerce Views

Open

Reported for: Toolset WooCommerce Blocks 2.8.1.1

Symptoms

When styling the Shop and other product archives with WooCommerce Views you may add a Quantity Selector to add more than a single product at a time to the cart.

However, if you use the WooCommerce AJAX add to cart features to add Items to the cart (which is the default) then you can add only one item to the cart each time, no matter how much you specify in the input.

Workaround

You can solve this temporarily by adding this JS Code to the Archive where you display the Products (Shop). Once this is solved in WooCommerce Views you should remove that code again.

jQuery( document ).ready( function( $ ) {
$( document ).on( 'change', '.quantity .qty', function() {
$( this ).parent( '.quantity' ).next( '.add_to_cart_button' ).data( 'quantity', $( this ).val() ).attr( 'data-quantity', $( this ).val() );
});
});

One thought on Impossible to add more than one Item to cart, on the Shop page, if styled with Woocommerce Views

  • Okay, I’m having this issue, which seems like a major flaw of the ToolSet custom woocommerce product content template but anyhow…

    Where and how do I actually add that code to the website? Currently don’t have a child theme running, do i need to make one? And if so, does this go into the functions file?

    Using toolset because I prefer to not have to do this stuff btw…

Leave
a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>