// 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:
bMancone
2011-09-21 09:47:30 +00:00
parent 1947e320c9
commit 22707acfae
+1 -1
View File
@@ -2154,7 +2154,7 @@ class ProductCore extends ObjectModel
}
// 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
SET quantity = '.(($update) ? 'quantity + '. $quantity : $quantity).'