I'm trying to create a form to be able to add multiple simple products to the cart with one click like this page:


all the similar questions I have seen either have no answers are for different versions or suggest using ajax [we are not using ajax]

How can Magento be configured to be able to add multiple products WITH amounts to the cart with one click?

2 Answers 2


You want the feature "grouped products" instead of simple product. Try it!


There are many ways you can achieve this. As you mention you want to do it for simple products. You can create your own controller and add products to cart.

You will need to pass product ids in hidden array and create your custom action to add product in cart.

class Custom_Module_AddController extends Mage_Core_Controller_Front_Action {

    public function addProductAction() {
        $products = $this->getRequest()->getParam('products');
        $cart = Mage::getModel('checkout/cart');
        /* @var $pModel Mage_Catalog_Model_Product */
        foreach ($products as $product_id) {
            if ($product_id == '') {
            $pModel = Mage::getModel('catalog/product')->load($product_id);
            if ($pModel->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_SIMPLE) {
                try {
                    $cart->addProduct($pModel, array('qty' => '1'));
                catch (Exception $e) {

You can also pass qty in form with product array.


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.