// Fixed setStock(): Quantity is now set correctly
This commit is contained in:
1 parent
3da8ff887f
commit
4bcf902c52
1 file changed
+1
-1
+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