File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
app/code/Magento/CatalogRule/Model Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change 42
42
*/
43
43
class Rule extends \Magento \Rule \Model \AbstractModel
44
44
{
45
- const PERCENTAGE_VALIDATION_ERR_MSG = 'Percentage discount should be between 0 and 100. ' ;
46
- const NOT_NEGATIVE_VALIDATION_ERR_MSG = 'Discount value should be 0 or greater. ' ;
47
- const INCORRECT_ACTION_ERR_MSG = 'Unknown action. ' ;
48
-
49
45
/**
50
46
* Prefix of model events names
51
47
*
@@ -388,17 +384,17 @@ protected function validateDiscount($action, $discount)
388
384
case 'by_percent ' :
389
385
case 'to_percent ' :
390
386
if ($ discount < 0 || $ discount > 100 ) {
391
- $ result [] = __ (self :: PERCENTAGE_VALIDATION_ERR_MSG );
387
+ $ result [] = __ (' Percentage discount should be between 0 and 100. ' );
392
388
};
393
389
break ;
394
390
case 'by_fixed ' :
395
391
case 'to_fixed ' :
396
392
if ($ discount < 0 ) {
397
- $ result [] = __ (self :: NOT_NEGATIVE_VALIDATION_ERR_MSG );
393
+ $ result [] = __ (' Discount value should be 0 or greater. ' );
398
394
};
399
395
break ;
400
396
default :
401
- $ result [] = __ (self :: INCORRECT_ACTION_ERR_MSG );
397
+ $ result [] = __ (' Unknown action. ' );
402
398
}
403
399
return $ result ;
404
400
}
You can’t perform that action at this time.
0 commit comments