[-] BO: Fix out of stock creation with multishop and stock sharing
This commit is contained in:
1 parent
4a3e0c5075
commit
31c94caebc
1 file changed
-4
@@ -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(
|
||||
|
||||
Reference in new issue
Block a user