Skip to content

Commit 7431c27

Browse files
authored
#8618: Apply coupon code button issue on Checkout
- fixed issue with assigning coupon_code value from totals.
1 parent a005167 commit 7431c27

File tree

1 file changed

+3
-1
lines changed
  • app/code/Magento/SalesRule/view/frontend/web/js/view/payment

1 file changed

+3
-1
lines changed

Diff for: app/code/Magento/SalesRule/view/frontend/web/js/view/payment/discount.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@ define([
1515

1616
var totals = quote.getTotals(),
1717
couponCode = ko.observable(null),
18-
isApplied = ko.observable(couponCode() != null);
18+
isApplied;
1919

2020
if (totals()) {
2121
couponCode(totals()['coupon_code']);
2222
}
2323

24+
isApplied = ko.observable(couponCode() != null);
25+
2426
return Component.extend({
2527
defaults: {
2628
template: 'Magento_SalesRule/payment/discount'

0 commit comments

Comments
 (0)