Hello Magento Friends,

In today’s Magento tutorial guide, I will explain How to Add Group Product into Cart Individually in Magento 2.

Suppose you have two simple products associated with grouped products on the product detail page and have a separate add-to-cart button for each product. When you press the add to cart button for the first product, both products are added. If you want to add individual products to the cart for grouped products in Magento 2, use the following steps.

Steps to Add Group Product into Cart Individually in Magento 2:

Step 1: You need to override the grouped.phtml file in your theme. For that, go to the below file path.

app\design\frontend\Theme\Yourtheme\Magento_GroupedProduct\templates\product\view\type\grouped.phtml

And add the code as follows.

Step 2: After that, you need to run the below command.

Conclusion:

This way, you can add group products into the cart individually in Magento 2. Also, learn How to Create Grouped Product Programmatically in Magento 2

If you have difficulty with the above solution, share it with me by commenting here. Share the article with your friends and stay updated with us for more Magento 2 tutorials.

Happy Coding!

Click to rate this post!
[Total: 2 Average: 5]