[-) BO : Action is mandatory for a cart rule
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user