[-) BO : Action is mandatory for a cart rule

This commit is contained in:
gRoussac
2013-11-05 11:26:10 +01:00
parent 87be153e42
commit 581645ce6d
@@ -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();