-
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
Percentage discount on tier price and catalog price rule calculated on original price without selected options. #38750
Comments
Hi @mdkdev. Thank you for your report.
Join Magento Community Engineering Slack and ask your questions in #github channel. |
Hi @engcom-Delta. Thank you for working on this issue.
|
Hi @mdkdev , Verified the issue on latest 2.4.7 and 2.4-develop, it is reproducible. Hence, Confirming the issue. Steps to reproduce:- 1.Configure a simple product with a price 1000 Actual Result: The tier price is calculated based on the original product price without the selected custom options. (1000 - 500) - 500 = 0 Where 1000 is the original product price, 500 is the negative custom option value and the other 500 is 50% of the original product price (1000). Screen.Recording.2024-05-24.at.2.mp4 |
✅ Jira issue https://jira.corp.adobe.com/browse/AC-12004 is successfully created for this GitHub issue. |
✅ Confirmed by @engcom-Delta. Thank you for verifying the issue. |
Hi @engcom-Delta, Thank you for confirming the issue. The same problem occurs when a catalog price rule is set to (for example) a specific customer group. The discount is then deducted from the original price, which means that the following example results in a 0,- total: Original Product Price: 1000.00 Total Price: (1000 / 2) - 500 = 0.00 This should be a 50% discount on the configured product: Total Price: (1000 - 500) / 2 = 250.00 magento_cart_price_rule_custom_options.mp4Should this be added to a new issue, or is this the right place? Thank you. |
@magento I am working on this |
Hi @mdkdev , I have updated the main description and added the scenario in additional information. Thanks, |
Hi, I have looked into this issue. The problem is narrowed to 2 javascript files:
My understanding is: we want to inverse this calculation. We want instead the custom option prices to be performed first and then the tier prices would be adjusted after. These 2 files have their logic intertwined with their UI. Some event subscribers seem to interact from one price to another price type.. I would like enquire on possible documentation to gain awareness of design/architecture around the price calculation on the product detail page. Would we have a diagram to understand the flow with the prices data and the UI on the product page? |
Preconditions and environment
Steps to reproduce
For a clear example, use the following numbers:
Product Price: 1000
Tier Price: 50% Discount
Custom Option Value: -500
Expected result
The tier price discount is calculated on the price including the custom options. For example:
(1000 - 500) / 2 = 250
Where 1000 is the original product price, 500 is the negative custom option value and 2 is the 50% discount from the tier price.
Actual result
The tier price is calculated based on the original product price without the selected custom options.
(1000 - 500) - 500 = 0
Where 1000 is the original product price, 500 is the negative custom option value and the other 500 is 50% of the original product price (1000).
Additional information
Screencast:
https://github.com/magento/magento2/assets/6543944/41b32739-a861-40b8-8a21-19c562a48c03
Scenario:2
The same problem occurs when a catalog price rule is set to (for example) a specific customer group. The discount is then deducted from the original price, which means that the following example results in a 0,- total:
Original Product Price: 1000.00
Cart Price Rule: -50%
Custom Option Price: -500
Total Price: (1000 / 2) - 500 = 0.00
This should be a 50% discount on the configured product:
Total Price: (1000 - 500) / 2 = 250.00
magento_cart_price_rule_custom_options.mp4
Release note
No response
Triage and priority
The text was updated successfully, but these errors were encountered: