Open serhiikv opened 3 months ago
Hi @serhiikv. 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.
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: :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
.Issue: Confirmed
once verification is complete. @magento give me 2.4-develop instance
Hi @engcom-Bravo. Thank you for your request. I'm working on Magento instance for you.
Hi @engcom-Bravo, here is your Magento Instance: https://16d879d04480f916c2d2f786540d1680.instances-prod.magento-community.engineering Admin access: https://16d879d04480f916c2d2f786540d1680.instances-prod.magento-community.engineering/admin_38e1 Login: 765294e7 Password: 49ec4bb9a057
Hi @serhiikv,
Thanks for your reporting and collaboration.
We have verified the issue in Latest 2.4-develop instance and the issue is reproducible.Kindly refer the screenshots.
In API response receive discount_percent equals 13
Hence Confirming the issue.
Thanks.
:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-12754 is successfully created for this GitHub issue.
:white_check_mark: Confirmed by @engcom-Bravo. Thank you for verifying the issue.
Issue Available: @engcom-Bravo, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
Preconditions and environment
Steps to reproduce
1. Create new cart price rules with the following configuration
Rule 1:
Rule 2:
orders/{id}
for this orderExpected result
In API response receive
discount_percent
equals 12.7Actual result
In API response receive
discount_percent
equals 13Additional information
Magento2 REST api for
orders
has one field fordiscount_percent
. In case when order has multiple discounts they are just added. This results in incorrect calculation.e.g. order amount 12. discount1 = 10%, discount2 = 3%. How magento2 does calculation:
But if API response is used to calculate discount - it will result in wrong discount amount:
The correct
discount_percent
in this case would be 12.7:Is it possible to change logic behind
discount_percent
field in REST API response in case of multiple discounts?Release note
No response
Triage and priority