Skip to content

Commit

Permalink
#30255: Fixed The coupon code has been accepted. message remains afte…
Browse files Browse the repository at this point in the history
…r a Coupon Code was removed

reverted previous changes and updated requested changes
  • Loading branch information
shikhamis11 committed Oct 10, 2020
1 parent f54561e commit 16e962d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 3 additions & 1 deletion app/code/Magento/Sales/Controller/Adminhtml/Order/Create.php
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,9 @@ protected function _processActionData($action = null)
$this->messageManager->addSuccessMessage(__('The coupon code has been accepted.'));
}
}
}
} else if (isset($data['coupon']['code']) && empty($couponCode)) {
$this->messageManager->addSuccessMessage(__('The coupon has been removed.'));
}

return $this;
}
Expand Down
1 change: 1 addition & 0 deletions app/code/Magento/Sales/i18n/en_US.csv
Original file line number Diff line number Diff line change
Expand Up @@ -803,3 +803,4 @@ If set YES Email field will be required during Admin order creation for new Cust
"Could not save the shipment tracking","Could not save the shipment tracking"
"Please enter a coupon code!","Please enter a coupon code!"
"Reorder is not available.","Reorder is not available."
"The coupon code has been removed.","The coupon code has been removed."
Original file line number Diff line number Diff line change
Expand Up @@ -1202,10 +1202,7 @@ define([
for (var i = 0; i < this.loadingAreas.length; i++) {
var id = this.loadingAreas[i];
if ($(this.getAreaId(id))) {
if ('message' != id && response[id]) {
$(this.getAreaId(id)).update(response[id]);
}
if ('message' == id) {
if ('message' != id || response[id]) {
$(this.getAreaId(id)).update(response[id]);
}
if ($(this.getAreaId(id)).callback) {
Expand Down

0 comments on commit 16e962d

Please sign in to comment.