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; }
$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; }