// 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:
rGaillard
2011-11-21 11:06:35 +00:00
parent 9d10de0848
commit 9b6824a825
13 changed files with 66 additions and 46 deletions
+8 -1
View File
@@ -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.');
}