-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Incorrect discount amount when applying multiple 'Fixed amount discount for whole cart' rules #39536
Comments
Hi @nghia-34th. Thank you for your report.
Join Magento Community Engineering Slack and ask your questions in #github channel. |
The issue is due to this class Magento\SalesRule\Model\Quote\Discount, line 209. $totalDiscount should be the sum of each rule's base discount applied to the current item. |
Hi @engcom-Bravo. Thank you for working on this issue.
|
Hi @nghia-34th, Thanks for your reporting and collaboration. We have tried to reproduce the issue in Latest 2.4-develop instance and the issue is not reproducible.Kindly refer the screenshots. The Discount amount in the cart summary section was correctly applied. Kindly recheck the issue in Latest 2.4-develop instance and elaborate the steps to reproduce if the issue is still reproducible. Thanks. |
@magento give me 2.4-develop instance |
@engcom-Bravo I'm unable to request a 2.4-develop instance on this issue, do you have any advice? |
Hi @nghia-34th, Thanks for your Update. The Magento 2.4-develop instance service(MDS) has been decommissioned and since the issue is not reproducible in Latest 2.4-develop instance it might be possible the issue has been addressed and fixed in Latest 2.4-develop branch.Hence we are closing this issue. Thanks. |
@engcom-Bravo Hold on now, you can't just make an assumption and immediately close the issue like that. Step 1: Add more than one item to cart. |
Hi @nghia-34th, Thanks for your update. We are reopening this issue as per this comment #39536 (comment) Thanks. |
Hi @nghia-34th, Thanks for your update. We have tried to reproduce the issue in Latest 2.4-develop instance and we are not able to reproduce the issue.Kindly refer the screenshots. The Discount amount in the cart summary section was correctly applied. Kindly recheck the issue in Latest 2.4-develop instance and elaborate the steps to reproduce if the issue is still reproducible. Thanks. |
@engcom-Bravo I can see that you're adding two simple products, which both will match the condition of the rule "Test12". Please refer to the second step: Update one or more of the "Fixed amount discount for whole cart" rules configured above so that it should only apply to some specific items in cart but not all. English isn't my first language, so I might be wrong/missing context in this step. Maybe explaining it with an example would help you understand, it should look like this:
In the above table, the RULE 2 condition is configured so that it only applies to one item, not all. And this is the scenario where it would trigger the error. |
Hi @nghia-34th, Thanks for your update. We have tried to reproduce the issue in Latest 2.4-develop instance and we are not able to reproduce the issue.Kindly refer the screenshots. We have added one simple product and configurable product and the rule TEST12 only matches with the product Simple.The Discount amount in the cart summary section was correctly applied. Kindly recheck the issue in Latest 2.4-develop instance and elaborate the steps to reproduce if the issue is still reproducible. Thanks. |
Okay, you can close it then. |
Hi @nghia-34th, Thanks for your Update. We are closing this issue Please feel free to reopen the issue if the issue still persists. Thanks. |
Preconditions and environment
Steps to reproduce
Expected result
The Discount amount in the cart summary section should be correct.
Actual result
Incorrect Discount amount shown.
Additional information
Rule 1:
Rule 2:
Rule 3:
Expected discount amount should be 15,00 US$. The actual amount shown is 15,30 US$.
Release note
No response
Triage and priority
The text was updated successfully, but these errors were encountered: