Skip to content

Commit 7bfade0

Browse files
committed
AC-12170 :: Coupon code feature is not working properly in the checkout page on Magento 2.4.7
1 parent 1b3a0a3 commit 7bfade0

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

app/code/Magento/SalesRule/view/frontend/web/js/view/payment/captcha.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,4 @@ define([
6666
}
6767
}
6868
});
69-
});
69+
});

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ define([
2121
if (totals()) {
2222
couponCode(totals()['coupon_code']);
2323
}
24-
isApplied(couponCode() != null);
24+
25+
var couponCodeValue = couponCode();
26+
isApplied(typeof couponCodeValue === 'string' && couponCodeValue.length > 0);
2527

2628
return Component.extend({
2729
defaults: {
@@ -69,4 +71,4 @@ define([
6971
return $(form).validation() && $(form).validation('isValid');
7072
}
7173
});
72-
});
74+
});

0 commit comments

Comments
 (0)