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

Discount Amount Wrong When Apply Multi Cart Rules #39448

Open
5 tasks
m08110071 opened this issue Dec 6, 2024 · 5 comments
Open
5 tasks

Discount Amount Wrong When Apply Multi Cart Rules #39448

m08110071 opened this issue Dec 6, 2024 · 5 comments
Assignees
Labels
Issue: needs update Additional information is require, waiting for response Reported on 2.4.7-p2 Indicates original Magento version for the Issue report.

Comments

@m08110071
Copy link

Preconditions and environment

  • Magento 2.4.7-p2

Steps to reproduce

  • Add new simple product with price 1000$, no tax

  • Add new cart price rule 1 to apply for all cart: No coupon, Discount 100$ for whole cart, Priority: 1
    image

  • Add new cart price rule 2 to apply for all cart: No coupon, Discount 10% of product price, Priority: 10
    image

  • Add new product to cart and go to cart page

  • Check discount amount, total discount is 190$. It should be 200$
    image

  • Change priority of cart price rules: rule 1 => 10, rule 2 => 1

  • Check discount amount, total discount is 200$
    image

Expected result

  • Total discount amount should not depend on priority of cart price rules and should be 200$ for all cases

Actual result

  • Total discount amount is changed when cart price rules priority are changed

Additional information

No response

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 Dec 6, 2024

Hi @m08110071. 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.


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.

Copy link

m2-assistant bot commented Dec 6, 2024

Hi @engcom-Bravo. 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).
  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue.
  • 3. Add Area: XXXXX label to the ticket, indicating the functional areas it may be related to.
  • 4. Verify that the issue is reproducible on 2.4-develop branch
    Details- 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!
  • 5. Add label Issue: Confirmed once verification is complete.
  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@engcom-Bravo engcom-Bravo added the Reported on 2.4.7-p2 Indicates original Magento version for the Issue report. label Dec 6, 2024
@engcom-Bravo
Copy link
Contributor

Hi @m08110071,

Thanks for your reporting and collaboration.

We have verified the issue in Latest 2.4-develop instance and the issue is not reproducible.As Per Magento devdocs https://experienceleague.adobe.com/en/docs/commerce-admin/marketing/promotions/cart-rules/price-rules-cart-create#step-3-define-the-actions it is an expected behaviour of magento.

Screenshot 2024-12-06 at 10 02 32 am

The rule having highest priority(i.e 1) it will controls the cart first.

As per the steps to reproduce we have set priortity 1 to cart price rule 1 and priority 10 to cart price rule 2.

It will apply like this :

1000-100=900>>cart price rule 1

900-90(10%discount)=810>>cart price rule 2

Screenshot 2024-12-06 at 10 06 51 am

If we change priorities of cart price rule

It will apply like this :

1000-100(10%discount)=900>>cart price rule 1

900-100=800>>cart price rule 2

Screenshot 2024-12-06 at 10 10 04 am

Here cart price rule will control the cart first as per the priority.Could you please let us know if you are still facing any issue.

Thanks.

@engcom-Bravo engcom-Bravo added the Issue: needs update Additional information is require, waiting for response label Dec 6, 2024
@engcom-Bravo engcom-Bravo moved this from Ready for Confirmation to Needs Update in Issue Confirmation and Triage Board Dec 6, 2024
@m08110071
Copy link
Author

Hi @engcom-Bravo

image As document, discount amount should be calculated from product original price instead discounted price. Please help to check again, thank you!

@engcom-Bravo
Copy link
Contributor

Hi @m08110071,

Thanks for your update.

Since we have defined priorities for the cart price rules after applying highest priority cart price rule the price of the product will be decreased and after second rule will apply and it is an expected behaviour of magento.

Even though if we enable Discard Subsequent Rules the highest priority will control the action.

Screenshot 2024-12-11 at 10 08 47 am

https://experienceleague.adobe.com/en/docs/commerce-admin/marketing/promotions/cart-rules/price-rules-cart-create#step-3-define-the-actions as per the document and based on the priorities it is an expected behaviour of Magento.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: needs update Additional information is require, waiting for response Reported on 2.4.7-p2 Indicates original Magento version for the Issue report.
Projects
Development

No branches or pull requests

2 participants