// Don't set stockavailable to 0 if stock management is enabled but not configured for the product

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@17915 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rGaillard
2012-10-23 08:18:31 +00:00
parent 0284e506e0
commit 666e2cc940
+1 -1
View File
@@ -245,7 +245,7 @@ class StockAvailableCore extends ObjectModel
}
// 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);
}