From d29a1efd196ed67702a37ed5ce8365981442528e Mon Sep 17 00:00:00 2001 From: rGaillard Date: Fri, 13 Jul 2012 08:52:42 +0000 Subject: [PATCH] [-] Core : Fix PSCFV-2898 delete stock_available after combination deletion git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16403 b9a71923-0436-4b27-9f14-aed3839534dd --- classes/Combination.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/classes/Combination.php b/classes/Combination.php index f66a5895f..88b56ff9f 100644 --- a/classes/Combination.php +++ b/classes/Combination.php @@ -101,7 +101,10 @@ class CombinationCore extends ObjectModel { if (!parent::delete()) return false; - + + // Removes the product from StockAvailable, for the current shop + StockAvailable::removeProductFromStockAvailable((int)$this->id_product, (int)$this->id); + if (!$this->hasMultishopEntries() && !$this->deleteAssociations()) return false; return true;