2

I want to set maximum quantity per order not per product. I tried to set the System->Configuration->Catalog->Inventory->Maximum Qty Allowed in Shopping Cart to 3, as per requirement only 3 item per order, The problem is when I tried to add 9 items 3 per product it is allowed. What I want is just to set 3 on whole cart regardless of item. Does anyone know a way to achieve this? Thanks

0

I already found alternative on this. My scenario is i want to limit the order in 5 quantity only. I dont know if it is the right way but it is working to me.

Go to app\code\core\Mage\Checkout\controllers\OnepageController.php

in function indexAction() put below code;

$count = Mage::helper('checkout/cart')->getSummaryCount();
if (abs($count) > 5) {
    Mage::getSingleton('checkout/session')->addError($this->__('You have exceed the maximum quantity for this order. Maximum quantity per order is 5.'));
    $this->_redirect('checkout/cart');
    return;
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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