From 666e2cc940abd1a06022d02dea12ef07545ff60d Mon Sep 17 00:00:00 2001 From: rGaillard Date: Tue, 23 Oct 2012 08:18:31 +0000 Subject: [PATCH] // 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 --- classes/stock/StockAvailable.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/stock/StockAvailable.php b/classes/stock/StockAvailable.php index 252a82bf3..bf151e1fd 100644 --- a/classes/stock/StockAvailable.php +++ b/classes/stock/StockAvailable.php @@ -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); }