// Replacement of AdminTab by AdminController on modules
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10334 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -250,7 +250,14 @@ class AdminCartsController extends AdminController
|
||||
$this->context->cart->save();
|
||||
if (!count($errors))
|
||||
{
|
||||
if (!($qty_upd = $this->context->cart->updateQty($qty, $id_product, (int)$id_product_attribute, (int)$id_customization, 'up')))
|
||||
if ((int)$qty < 0)
|
||||
{
|
||||
$qty = str_replace('-', '', $qty);
|
||||
$operator = 'down';
|
||||
}
|
||||
else
|
||||
$operator = 'up';
|
||||
if (!($qty_upd = $this->context->cart->updateQty($qty, $id_product, (int)$id_product_attribute, (int)$id_customization, 0, $operator)))
|
||||
$errors[] = Tools::displayError('You already have the maximum quantity available for this product.');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user