// Stockavailable debugged

This commit is contained in:
bMancone
2011-12-20 13:31:45 +00:00
parent 55ae44376b
commit 7972d083ec
3 changed files with 12 additions and 2 deletions
+1 -1
View File
@@ -192,7 +192,7 @@ class ProductCore extends ObjectModel
* @since 1.5.0
* @var boolean Tells if the product uses the advanced stock management
*/
public $advanced_stock_management;
public $advanced_stock_management = 0;
public $isFullyLoaded = false;
+8
View File
@@ -165,6 +165,14 @@ class StockAvailableCore extends ObjectModel
Db::getInstance()->autoExecute($query['table'], $query['data'], $query['type'], $query['where']);
}
}
// In case there are no warehouses, removes product from StockAvailable
if (count($ids_warehouse) == 0)
{
self::removeProductFromStockAvailable($id_product);
foreach ($ids_product_attribute as $id_product_attribute)
self::removeProductFromStockAvailable($id_product, $id_product_attribute);
}
}
/**