diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order/Create.php b/app/code/Magento/Sales/Controller/Adminhtml/Order/Create.php index 45cd504be201a..cf61c9784ccf8 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Order/Create.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/Create.php @@ -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; } diff --git a/app/code/Magento/Sales/i18n/en_US.csv b/app/code/Magento/Sales/i18n/en_US.csv index 97c1706f975da..0e65131b7c4b0 100644 --- a/app/code/Magento/Sales/i18n/en_US.csv +++ b/app/code/Magento/Sales/i18n/en_US.csv @@ -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." diff --git a/app/code/Magento/Sales/view/adminhtml/web/order/create/scripts.js b/app/code/Magento/Sales/view/adminhtml/web/order/create/scripts.js index 86eaa67d73866..8f13e6d9dab0d 100644 --- a/app/code/Magento/Sales/view/adminhtml/web/order/create/scripts.js +++ b/app/code/Magento/Sales/view/adminhtml/web/order/create/scripts.js @@ -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) {