[-] BO : fixed bug #PSCFV-1296 - Can't add a product in order (BO)

// Fix backward compatibility issue with updateQty method

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15152 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
aFolletete
2012-05-10 09:29:46 +00:00
parent 8cede91978
commit 47cfd2b9f9
6 changed files with 15 additions and 15 deletions
+1 -1
View File
@@ -338,7 +338,7 @@ class AdminCartsControllerCore extends AdminController
else
$operator = 'up';
if (!($qty_upd = $this->context->cart->updateQty($qty, $id_product, (int)$id_product_attribute, (int)$id_customization, 0, $operator)))
if (!($qty_upd = $this->context->cart->updateQty($qty, $id_product, (int)$id_product_attribute, (int)$id_customization, $operator)))
$errors[] = Tools::displayError('You already have the maximum quantity available for this product.');
}
+2 -2
View File
@@ -1474,8 +1474,7 @@ class AdminOrdersControllerCore extends AdminController
}
// Add product to cart
$cart->updateQty($product_informations['product_quantity'], $product->id, isset($combination) ? $combination->id : null, false, 'up', new Shop($cart->id_shop));
$cart->updateQty($product_informations['product_quantity'], $product->id, isset($combination) ? $combination->id : null, false, 0, 'up', new Shop($cart->id_shop));
// If order is valid, we can create a new invoice or edit an existing invoice
if ($order->hasInvoice())
{
@@ -1587,6 +1586,7 @@ class AdminOrdersControllerCore extends AdminController
$specific_price->delete();
$products = $this->getProducts($order);
// Get the last product
$product = $products[max(array_keys($products))];