Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions component/admin/language/en-GB/en-GB.com_redshop.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
7 changes: 7 additions & 0 deletions component/admin/models/coupon.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down