// Stockavailable debugged
This commit is contained in:
+1
-1
@@ -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;
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user