From 40630be3c4ab3190a5743f23c2fd405ccdd210f5 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 --- 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;