Reply 262790 to: Add To Cart With Quantity (Simple Products) Not Adding Correct Quantity Amount

Avatar: kaos77
kaos77
Participant
December 5, 2020 at 14:25

Hello,
So I ended up modifying the content-product.php file under theme folder.
and replaced

echo '<div class="quantity-wrapper">';
woocommerce_quantity_input( array(), $product, true );
woocommerce_template_loop_add_to_cart();
echo '</div>';

with the following:

?>
                        <form action="<?php echo esc_url( $product->add_to_cart_url() ); ?>" class="cart" method="post" enctype='multipart/form-data'>
                        <?php woocommerce_quantity_input(); ?>
                        <button type="submit" class="add_to_cart_button ajax_add_to_cart single_add_to_cart_button button alt">Add to Cart</button>
                        </form>
                        <?php

Which seems to have resolved the quantity issue. However, this fix does not solve the issues with all the other widgets such as the product slider, etc. I would have to apply similar fix.

I went ahead a removed all my modifcations and reset it back to normal so that your team can look into this issue.

Please contact administrator
for this information.
Go To The Whole Conversation In Topic
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.