// Don't set stockavailable to 0 if stock management is enabled but not configured for the product
This commit is contained in:
1 parent
698d99211b
commit
a92d92347a
1 file changed
+1
-1
@@ -245,7 +245,7 @@ class StockAvailableCore extends ObjectModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
// In case there are no warehouses, removes product from StockAvailable
|
// In case there are no warehouses, removes product from StockAvailable
|
||||||
if (count($ids_warehouse) == 0)
|
if (count($ids_warehouse) == 0 && StockAvailable::dependsOnStock((int)$id_product))
|
||||||
Db::getInstance()->update('stock_available', array('quantity' => 0 ), 'id_product = '.(int)$id_product);
|
Db::getInstance()->update('stock_available', array('quantity' => 0 ), 'id_product = '.(int)$id_product);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user