0

Most of my products are Grouped. The problem I have is that on the Category Pages when the Add To Cart button is clicked, it goes through to the Product page and immediately has the warning message at the top "Please specify the quantity of product(s)". I don't get this warning if the product image or text link is clicked on. It's obvious to the customer they need to enter quantities for the grouped products on the page. Is there a way to remove this? Ideally the Add To Cart button on the category grid and list view should just behave like a simple link to the Grouped Product page.

1 Answer 1

0

I changed the action on the form element by overriding the vendor file with Magento_Catalog/templates/product/list.phtml in the child theme. I also removed all the other code between the form tags except for the button.

<form action="<?php /* @escapeNotVerified */ echo $_product->getProductUrl() ?>" method="post">

Now the button link behaves the same as the product image link on the category page and doesn't add the warning. I will never need to add to the cart directly from the category page so this is a fix for my circumstances.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.