-- HikaShop version -- : 2.2.1
-- Joomla version -- : 3.0.4 Stable
-- PHP version -- : 5.4.7
I have the same scenario for backend as I have here
www.hikashop.com/forum/2-general-talk-ab...eforecartupdate.html
for front end.
If I use onAfterProductQuantityCheck ,it does not fire for backend.Also onBeforeOrderProductsUpdate did not work for me.
The code is-
function onBeforeOrderProductsUpdate(&$order, &$do){
$maxQtyMsg = 'Max quantity for product is 1.';
$canOrder = $this->canOrder($order->product[0]->product_id,$order->product[0]->order_product_quantity);
if(!$canOrder){
$do = false;
JFactory::getApplication()->enqueueMessage($maxQtyMsg, 'error');
}
}
The problem is, even if we set $do=false it updates order product.
I do not want to add/update product if quantity is more than one.
Regards,