diff --git a/component/admin/language/en-GB/en-GB.com_redshop.ini b/component/admin/language/en-GB/en-GB.com_redshop.ini index 895d50c0048..b8e67dae619 100644 --- a/component/admin/language/en-GB/en-GB.com_redshop.ini +++ b/component/admin/language/en-GB/en-GB.com_redshop.ini @@ -4687,6 +4687,7 @@ COM_REDSHOP_COUPON_REMAINING_AMOUNT = "Unused Amount" COM_REDSHOP_COUPON_ERROR_CODE_ALREADY_EXIST = "Oops! Coupon Code already exists." COM_REDSHOP_CONFIG_SUM_COUPON_SPECIFIC="Sum value coupon" COM_REDSHOP_CONFIG_SUM_COUPON_SPECIFIC_DESC="Sum coupon description" +COM_REDSHOP_COUPON_ENTER_FIELD_VALUE = "Please Enter field value" ; Vouchers COM_REDSHOP_VOUCHER_MANAGEMENT = "Voucher Management" diff --git a/component/admin/models/coupon.php b/component/admin/models/coupon.php index da815a010d8..45b3df26d21 100644 --- a/component/admin/models/coupon.php +++ b/component/admin/models/coupon.php @@ -39,6 +39,13 @@ public function save($data) return false; } + + if (empty($data['value'])) { + /** @scrutinizer ignore-deprecated */ + $this->setError(JText::_('COM_REDSHOP_COUPON_ENTER_FIELD_VALUE')); + + return false; + } if (!empty($data['start_date'])) { $data['start_date'] = \JFactory::getDate($data['start_date'])->toSql();