// norm fix

This commit is contained in:
vChabot
2012-02-03 13:50:51 +00:00
parent 5532098c90
commit 1cc726a7a6
@@ -72,7 +72,7 @@ class AdminCartRulesControllerCore extends AdminController
return parent::postProcess();
}
public function afterUpdate($currentObject)
public function afterUpdate($current_object)
{
// All the associations are deleted for an update, then recreated when we call the "afterAdd" method
$id_cart_rule = Tools::getValue('id_cart_rule');
@@ -82,7 +82,7 @@ class AdminCartRulesControllerCore extends AdminController
Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'cart_rule_product_rule_value` WHERE `id_product_rule` NOT IN (SELECT `id_product_rule` FROM `'._DB_PREFIX_.'cart_rule_product_rule`)');
Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'cart_rule_combination` WHERE `id_cart_rule_1` = '.(int)$id_cart_rule.' OR `id_cart_rule_2` = '.(int)$id_cart_rule);
$this->afterAdd($currentObject);
$this->afterAdd($current_object);
}
/* @TODO Move this function into CartRule */