[-] BO: Fix out of stock creation with multishop and stock sharing

This commit is contained in:
Rémi Gaillard
2013-09-11 16:22:13 +02:00
parent 4a3e0c5075
commit 31c94caebc

View File

@@ -305,11 +305,7 @@ class StockAvailableCore extends ObjectModel
if (!Validate::isUnsignedId($id_product))
return false;
if ($id_shop === null)
$id_shop = Context::getContext()->shop->id;
$existing_id = StockAvailable::getStockAvailableIdByProductId((int)$id_product, (int)$id_product_attribute, (int)$id_shop);
if ($existing_id > 0)
{
Db::getInstance()->update(