From 581645ce6dc046b0f95c7a9fadc67c7922482d7f Mon Sep 17 00:00:00 2001 From: gRoussac Date: Tue, 5 Nov 2013 11:26:10 +0100 Subject: [PATCH] [-) BO : Action is mandatory for a cart rule --- controllers/admin/AdminCartRulesController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/controllers/admin/AdminCartRulesController.php b/controllers/admin/AdminCartRulesController.php index 9a0fddeb8..46dff7674 100644 --- a/controllers/admin/AdminCartRulesController.php +++ b/controllers/admin/AdminCartRulesController.php @@ -128,6 +128,8 @@ class AdminCartRulesControllerCore extends AdminController $this->errors[] = Tools::displayError('Reduction amount cannot be lower than zero.'); if (Tools::getValue('code') && ($same_code = (int)CartRule::getIdByCode(Tools::getValue('code'))) && $same_code != Tools::getValue('id_cart_rule')) $this->errors[] = sprintf(Tools::displayError('This cart rule code is already used (conflict with cart rule %d)'), $same_code); + if (Tools::getValue('apply_discount') == 'off' && !Tools::getValue('free_shipping') && !Tools::getValue('free_gift')) + $this->errors[] = Tools::displayError('An action is required for this cart rule.'); } return parent::postProcess();