Closed
Description
This issue is automatically created based on existing pull request: #30167: Set correct discount package value for tablerate
Preconditions (*)
Magento 2.4-develop
This PR fixes the issue for the table rate carrier where the 'package value with discount' in the RateRequest is filled with the package value without the discount.
Currently, when you have a cart rule which sets a discount on the cart, the discount will not be used for the table rate.
Steps to reproduce:
- Create a table rate based on subtotal, f.e. 5 euro from a subtotal of 0, free shipping from a subtotal of 100 euros.
- Create a cart rule which sets a discount of 10% on cart, on subtotal only
- Ensure you have an item in your cart which has the discount, with a value of between 105 euros.
- The cart rule subtracts 10,5 from 105 - resulting in a total of 94,50. Shipping should be 5 euros as the subtotal now is below 100, but it's 0 because the price value without discount is used.
Related Pull Requests
Fixed Issues (if relevant)
Steps to reproduce: (*)
- Create a table rate based on subtotal, f.e. 5 $ from a subtotal of 0, free shipping from a subtotal of 100 $.
- Create a cart price rule which sets a discount of 10% on the cart, on subtotal only;
- Ensure you have an item in your cart which has the discount, with a value of between 105 $;
Actual Result: ✖️ Shipping amount is 0 because the price value without discount is used.
Expected Result: ✔️ Shipping should be 5 euros
Questions or comments
Contribution checklist (*)
- Pull request has a meaningful description of its purpose
- All commits are accompanied by meaningful commit messages
- All new or changed code is covered with unit/integration tests (if applicable)
- All automated tests passed successfully (all builds are green)
Metadata
Metadata
Assignees
Labels
The issue has been fixed in 2.4-develop branchGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 4. Acknowledged. Issue is added to backlog and ready for developmentMay be fixed according to the position in the backlog.Indicates original Magento version for the Issue report.The issue has been reproduced on latest 2.4-develop branchAffects non-critical data or functionality and does not force users to employ a workaround.
Type
Projects
Status
Done