Hi,
I’m trying to add quantity to the general shop page for each product. I’ve added the below to my functions.php file:
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart');
add_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_single_add_to_cart', 30);
This does partially work – it got the quantity field to appear next to every product. However, actually adding the product is really buggy. It’ll add the quantity of a different product seemingly at random, e.g. 3 product1’s added to cart by the user, then when attempting to add 6 product2s to cart it adds 3 instead. The next add to cart click on product2 will then add 6, then back to 3. Very odd. Is there a way to implement this easily on the Royal theme? I know there are some changes I can do to the add-to-cart.php file in woocommerce/loop and have tried that, but it didn’t seem to work out too well at all.
Any assistance is greatly appreciated!