// When removing a product, its stock available is now properly removed
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10111 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -601,6 +601,14 @@ class ProductCore extends ObjectModel
|
||||
if ($real_quantity > $physical_quantity)
|
||||
return false;
|
||||
|
||||
/**
|
||||
* @since 1.5.0
|
||||
* Removes the product from StockAvailable, for the current shop
|
||||
*/
|
||||
$context = Context::getContext();
|
||||
$id_shop = $context->shop->id;
|
||||
StockAvailable::removeProductFromStockAvailable($this->id, null, $id_shop);
|
||||
|
||||
if (!GroupReduction::deleteProductReduction($this->id))
|
||||
return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user