// Fixed setStock(): Quantity is now set correctly
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8681 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
+1
-1
@@ -2154,7 +2154,7 @@ class ProductCore extends ObjectModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Change stock quantity on product
|
// Change stock quantity on product
|
||||||
if ($id_stock = Stock::getStockId($this->id, $id_product_attribute, $shop->getID(true)))
|
if ($id_stock = Stock::getStockId($this->id, 0, $shop->getID(true)))
|
||||||
{
|
{
|
||||||
$sql = 'UPDATE '._DB_PREFIX_.'stock
|
$sql = 'UPDATE '._DB_PREFIX_.'stock
|
||||||
SET quantity = '.(($update) ? 'quantity + '. $quantity : $quantity).'
|
SET quantity = '.(($update) ? 'quantity + '. $quantity : $quantity).'
|
||||||
|
|||||||
Reference in New Issue
Block a user