[-] BO : cart rules are now cleaned when a component of a product rule (like a product, a category, a supplier...) is deleted

This commit is contained in:
dMetzger
2012-07-24 13:11:56 +00:00
parent 03de94f5c6
commit b31bd36b7b
6 changed files with 60 additions and 1 deletions
+3
View File
@@ -93,6 +93,9 @@ class AttributeCore extends ObjectModel
foreach ($combinations as $combination)
$combination->delete();
}
// Delete associated restrictions on cart rules
CartRule::cleanProductRuleIntegrity('attributes', $this->id);
/* Reinitializing position */
$this->cleanPositions((int)$this->id_attribute_group);