Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Issue] Sales Rules regression in 2.4.7 #38671

Open
1 of 5 tasks
Nuranto opened this issue Apr 27, 2024 · 14 comments · May be fixed by #38680
Open
1 of 5 tasks

[Issue] Sales Rules regression in 2.4.7 #38671

Nuranto opened this issue Apr 27, 2024 · 14 comments · May be fixed by #38680
Assignees
Labels
Area: Cart & Checkout Component: Frontend Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Progress: PR Created Indicates that Pull Request has been created to fix issue Progress: PR in progress Reported on 2.4.7 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch

Comments

@Nuranto
Copy link
Contributor

Nuranto commented Apr 27, 2024

Preconditions and environment

  • Magento version 2.4.7

Steps to reproduce

  1. Create a sales rule with :
    • Coupon code = test
    • No limitation
    • No conditions
    • Action = Fixed amount for whole cart, 1€ discount
    • Apply to Shipping Amount = yes
    • Product condition = name equals to "any_text_that_is_not_a_product_name"
  2. Apply 'test' coupon to a frontend cart with a shipping amount.

Expected result

Rule is applied. Discount of 1€ is applied on shipping amount

Actual result

Cannot add coupon to cart (invalid coupon)

Additional information

We had rules like this to add discount on shipping amount (and shipping amount only). It worked perfectly in previous versions, but does not work anymore in 2.4.7.

Regression happened in this commit : 79d57b4 where line $this->rulesApplier->maintainAddressCouponCode($address, $rule, $this->getCouponCode()); has been removed. @sivaschenko / @bl4de : was there a reason ?

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Copy link

m2-assistant bot commented Apr 27, 2024

Hi @Nuranto. 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:


Join Magento Community Engineering Slack and ask your questions in #github channel.
⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
🕙 You can find the schedule on the Magento Community Calendar page.
📞 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.

@m2-community-project m2-community-project bot added this to Ready for Confirmation in Issue Confirmation and Triage Board Apr 27, 2024
@engcom-Delta engcom-Delta added the Reported on 2.4.7 Indicates original Magento version for the Issue report. label Apr 27, 2024
Copy link

m2-assistant bot commented Apr 27, 2024

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: 👇

    1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
    1. Verify that issue has a meaningful description and provides enough information to reproduce the issue.
    1. Add Area: XXXXX label to the ticket, indicating the functional areas it may be related to.
    1. Verify that the issue is reproducible on 2.4-develop branch
      Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
      - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
      - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

@engcom-Dash
Copy link

@magento give me 2.4-develop instance

Copy link

Hi @engcom-Dash. Thank you for your request. I'm working on Magento instance for you.

Copy link

@engcom-Dash
Copy link

Hi @Nuranto

Thanks for reproting and collaboration.

Verified the issue on both 2.4 dev and 2.4.7 instances but the issue is not reproducable.

Steps to reproduce

  1. Create a sales rule with :

Coupon code = test
No limitation
No conditions
Action = Fixed amount for whole cart, 1€ discount
Apply to Shipping Amount = yes
Product condition = name equals to "any_text_that_is_not_a_product_name"

  1. Apply 'test' coupon to a frontend cart with a shipping amount.

We are able to apply the coupon code successfully.

Please refer the attached screenshots. Let us know if we missed anything.

Screenshot 2024-04-29 at 12 46 17 PM

@engcom-Dash engcom-Dash added the Issue: needs update Additional information is require, waiting for response label Apr 29, 2024
@m2-community-project m2-community-project bot moved this from Ready for Confirmation to Needs Update in Issue Confirmation and Triage Board Apr 29, 2024
@Nuranto
Copy link
Contributor Author

Nuranto commented Apr 29, 2024

Hello @engcom-Dash
On your Magento Instance, there's not product condition :
Capture d’écran 2024-04-29 à 10 20 34

I added one :
Capture d’écran 2024-04-29 à 10 23 24

And now :
Capture d’écran 2024-04-29 à 10 22 56

@engcom-Dash
Copy link

engcom-Dash commented Apr 29, 2024

Hi @Nuranto

Verified the issue on magento 2.4 dev instance and the issue is reproducible.

Steps to reproduce

Create a sales rule with :
Coupon code = test
No limitation
No conditions
Action = Fixed amount for whole cart, 1€ discount
Apply to Shipping Amount = yes
Product condition = name equals to "any_text_that_is_not_a_product_name"

Apply 'test' coupon to a frontend cart with a shipping amount.

Getting a coupon code is invalid. Hence, confirming this issue.

Please refer the attached screenshots.

Screenshot 2024-04-29 at 2 01 22 PM Screenshot 2024-04-29 at 2 02 28 PM

Note : In 2.4.7 the option SKU under "product attribute combination" is not present. We are not able to see the option.

Please refer the screenshot.

Screenshot 2024-05-03 at 12 33 25 PM

@engcom-Dash engcom-Dash added Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Component: Frontend Area: Cart & Checkout labels Apr 29, 2024
@m2-community-project m2-community-project bot removed the Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed label Apr 29, 2024
@m2-community-project m2-community-project bot moved this from Needs Update to Confirmed in Issue Confirmation and Triage Board Apr 29, 2024
@github-jira-sync-bot
Copy link

✅ Jira issue https://jira.corp.adobe.com/browse/AC-11876 is successfully created for this GitHub issue.

@m2-community-project m2-community-project bot added Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed and removed Issue: needs update Additional information is require, waiting for response labels Apr 29, 2024
Copy link

m2-assistant bot commented Apr 29, 2024

✅ 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.

@engcom-Dash engcom-Dash added the Priority: P2 A defect with this priority could have functionality issues which are not to expectations. label Apr 29, 2024
@m2-community-project m2-community-project bot added this to Ready for Development in High Priority Backlog Apr 29, 2024
@github-jira-sync-bot
Copy link

❌ You don't have permission to export this issue.

Nuranto added a commit to webcooking/magento2 that referenced this issue Apr 30, 2024
@m2-community-project m2-community-project bot moved this from Ready for Development to Pull Request In Progress in High Priority Backlog Apr 30, 2024
@github-jira-sync-bot github-jira-sync-bot added Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. and removed Priority: P2 A defect with this priority could have functionality issues which are not to expectations. labels Apr 30, 2024
@glo17720
Copy link
Contributor

glo17720 commented May 3, 2024

@magento give me 2.4-develop instance

Copy link

Hi @glo17720. Thank you for your request. I'm working on Magento instance for you.

Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Cart & Checkout Component: Frontend Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Progress: PR Created Indicates that Pull Request has been created to fix issue Progress: PR in progress Reported on 2.4.7 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch
Projects
High Priority Backlog
  
Dev In Progress
Development

Successfully merging a pull request may close this issue.

5 participants