Issue with my script: The problem is that this script only adds one product to the cart and not all the other simple products. Travisw, There are a couple of ways to do this.. Magento already has in-built functionality for this since you can add related products to the cart using the related_product hidden form parameter. How to Create Grouped Product Programmatically in Magento 2 So that customers can add multiple products to cart . After spending some time in coding, we pop out with a small piece of code that will help to do the same. Magento 2 Free Gift Extension | Add Free Product to Cart | Free Gift ... To disable the Ajax Add To Cart Functionality ,Follow below steps: Step 1: On the admin sidebar, go to Stores > Settings > Configuration . This is most useful when you want to add additional data to items in the cart, add products that require custom logic or simply add a gift for the customers purchasing your products. The quantities instead the sums. 0. . If any suggestion plz make a comments . In the General Options in the backend, admins just need to Select class and ID to be applied (separated by a comma). How to add multiple products to cart programmatically ... - Magento Forums All you have to do is copy the following code in the Magento 2 root script, and make the necessary changes into the code based on your specific Magento 2 store requirements After spending some time in coding, we pop out with a small piece of code that will help to do the same. Add Products to cart Programmatically in Magento How can this happen when the quote id is correct here. Below is the code that shows how we can add a product to cart with custom options programmatically. We can access different stores using below ways: 1) Domain (e.g.