Is it anyhow possible to limit specific products in Magento to a max quantity of one per order? This means the user can only order one product at a time. If he wants to orde
The below should fix your issue:
public function enforceSingleOrderLimit($observer){
if (!$this->_helper->isModuleEnabled()) {
return;
}
$cart = Mage::getModel('checkout/cart')->getQuote();
if ($cart->getItemsCount() > 1) {
Mage::getSingleton('checkout/session')->addError('limit only one product per order');
Mage::app()->getFrontController()->getResponse()->setRedirect(Mage::getUrl('checkout/cart'));
Mage::app()->getResponse()->sendResponse();
exit;
}
}