Closed TuVanDev closed 2 months ago
Hi @TuVanDev. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:
@magento give me 2.4-develop instance
- upcoming 2.4.x release@magento I am working on this
Join Magento Community Engineering Slack and ask your questions in #github channel. :warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting. :clock10: You can find the schedule on the Magento Community Calendar page. :telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.
@magento give me 2.4-develop instance
Hi @TuVanDev. Thank you for your request. I'm working on Magento instance for you.
Hi @TuVanDev, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.
Hi @engcom-Dash. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
Area: XXXXX
label to the ticket, indicating the functional areas it may be related to.2.4-develop
branch@magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure. 2.4-develop
branch, please, add the label Reproduced on 2.4.x
.Hi @TuVanDev the file attached is a patch file that seems to resolve the issue. I have looked at Magento develop branch and previous Magento versions and this file has not changed in a while. That means this may not address the root of the issue. However, the patch change is low risk and I hope it may be sufficient to get this problem addressed discount-issue.zip
Hey @digitalrisedorset, thanks for your assist.
Yep, the code isApplied(couponCode() != null);
in the file vendor/magento/module-sales-rule/view/frontend/web/js/view/payment/discount.js hasn't changes for years. It now has an empty value instead of null
. Therefore, isApplied(couponCode() != null);
should be changed to isApplied(couponCode() !== '');
I'll try to find the root cause and confirm if this is the best solution for this issue.
FYI, you can post the patch in your comment instead of sharing a zip file for more visibility.
the patch file code is:
`diff --git a/vendor/magento/module-sales-rule/view/frontend/web/js/view/payment/discount.js b/vendor/magento/module-sales-rule/view/frontend/web/js/view/payment/discount.js index 79e4085..ad3c109 100644 --- a/vendor/magento/module-sales-rule/view/frontend/web/js/view/payment/discount.js +++ b/vendor/magento/module-sales-rule/view/frontend/web/js/view/payment/discount.js @@ -21,7 +21,7 @@ define([ if (totals()) { couponCode(totals()['coupon_code']); }
isApplied(couponCode() != '');
return Component.extend({ defaults: {`
@digitalrisedorset GitHub supports Markdown, so you can use triple backticks. You can check it out at https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax
diff --git a/vendor/magento/module-sales-rule/view/frontend/web/js/view/payment/discount.js b/vendor/magento/module-sales-rule/view/frontend/web/js/view/payment/discount.js
index 79e4085..ad3c109 100644
--- a/vendor/magento/module-sales-rule/view/frontend/web/js/view/payment/discount.js
+++ b/vendor/magento/module-sales-rule/view/frontend/web/js/view/payment/discount.js
@@ -21,7 +21,7 @@ define([
if (totals()) {
couponCode(totals()['coupon_code']);
}
- isApplied(couponCode() != null);
+ isApplied(couponCode() !== '');
return Component.extend({
defaults: {
However, this will break the feature if the cart contains an item that is not virtual. Therefore, I've investigated and found the root cause of the issue. I'll create a pull request soon!
@magento I am working on this
@magento give me 2.4-develop instance
Hi @engcom-Dash. Thank you for your request. I'm working on Magento instance for you.
Hi @engcom-Dash, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.
Hi @TuVanDev
Thanks for reporting and collaboration.
Verified the issue Magento 2.4 dev instance and the issue is reproducible.
The coupon code feature is not working properly on the checkout page
Steps to reproduce:
Please refer the screenshots.
:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-12170 is successfully created for this GitHub issue.
:white_check_mark: Confirmed by @engcom-Dash. Thank you for verifying the issue.
Issue Available: @engcom-Dash, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
@magento give me 2.4-develop instance
Hi @slavvka. Thank you for your request. I'm working on Magento instance for you.
Hi @slavvka, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.
@magento give me 2.4-develop instance
Hi @slavvka. Thank you for your request. I'm working on Magento instance for you.
Hi @slavvka, here is your Magento Instance: https://9ceeb01fdafc117bec5bf7142b7b61a8.instances-prod.magento-community.engineering Admin access: https://9ceeb01fdafc117bec5bf7142b7b61a8.instances-prod.magento-community.engineering/admin_82b0 Login: 6463eb33 Password: 3b63bd84622c
Hi @TuVanDev,
Internal team has started to work on it”
Thanks.
@hostep Thanks for your contribution!!.
Hello,
As I can see this issue got fixed in the scope of the internal Jira ticket AC-12710 by the internal team Related commits: https://github.com/search?q=repo%3Amagento%2Fmagento2+AC+12170&type=commits
Based on the Jira ticket, the target version is 2.4.8-beta1.
Thanks
The link provided above doesn't work, but this one does: https://github.com/search?q=repo%3Amagento%2Fmagento2+AC+12170&type=commits
Preconditions and environment
Steps to reproduce
Example:
Expected result
The discount code/coupon input can be filled in, and the button title text displays as "Apply Discount".
Actual result
The discount code/coupon input is disabled, and the button title text displays as "Cancel coupon".
Additional information
It's important to note that I've tested this issue on Magento 2.4.6 and it didn't occurs.
Release note
No response
Triage and priority