Refactor code structure for improved readability and maintainability

This commit is contained in:
2025-09-17 00:16:25 +02:00
parent 62e48cfa22
commit 4f2e59e791
20 changed files with 67722 additions and 103 deletions

View File

@@ -24,11 +24,11 @@ class CartController extends CartControllerCore
{
parent::postProcess();
if(Tools::getIsset('addDiscount') && $this->errors && ($code = Tools::getValue('discount_name')) && Validate::isCleanHtml($code) && !CartRule::cartRuleExists($code)) {
Module::getInstanceByName('ets_promotion')->addCartRule($this->errors,$code);
Module::getInstanceByName('ets_promotion')->addCartRule($this->errors,$code);
}
if(Tools::isSubmit('deletePromotionDiscountRule') && ($id_ets_rule = Tools::getValue('deletePromotionDiscountRule')) && Validate::isUnsignedId($id_ets_rule) )
{
Module::getInstanceByName('ets_promotion')->deleteCartRule($id_ets_rule);
Module::getInstanceByName('ets_promotion')->deleteCartRule($id_ets_rule);
}
}
public function displayAjaxRefresh()