ACSD-61553: Cart Price Rule is incorrectly calculated when multiple discounts with different priorities are applied
The ACSD-61553 patch fixes the issue where the Cart Price Rule is incorrectly calculated when multiple discounts with different priorities are applied. This patch is available when the Quality Patches Tool (QPT) 1.1.53 is installed. The patch ID is ACSD-61553. Please note that this issue is scheduled to be fixed in Adobe Commerce 2.4.8.
Affected products and versions
The patch is created for Adobe Commerce version:
Adobe Commerce (all deployment methods) 2.4.5-p8
Compatible with Adobe Commerce versions:
Adobe Commerce (all deployment methods) 2.4.5 - 2.4.6-p8
magento/quality-patches
package to the latest version and check the compatibility on the Quality Patches Tool: Search for patches page. Use the patch ID as a search keyword to locate the patch.Issue
Cart Price Rule is incorrectly calculated when multiple discounts with different priorities are applied.
Steps to reproduce:
-
Create a simple product with a price of $9,000.
-
Create a Cart Price Rule: Rule A with a fixed discount of $700 without any conditions and without discarding subsequent rules.
-
Create another Cart Price Rule: Rule B with a fixed discount of $1000 without any conditions and without discarding subsequent rules.
-
Add the product with the quantity 13 to the cart.
-
Update the rules with any of the below scenarios:
Scenario 01
code language-none Rule A Priority: 1 Maximum Qty Discount is Applied To: 1 Rule B Priority: 0 Maximum Qty Discount is Applied To: 0
Scenario 02
code language-none Rule A Priority: 0 Maximum Qty Discount is Applied To: 0 Rule B Priority: 1 Maximum Qty Discount is Applied To: 1
Scenario 03
code language-none Rule A Priority: 0 Maximum Qty Discount is Applied To: 0 Rule B Priority: 0 Maximum Qty Discount is Applied To: 1
-
Click the Update Shopping Cart button to recalculate the discounts.
Expected results:
You see the following total discount for different scenarios:
Scenario 01: $13,700
Scenario 02: $10,100
Scenario 03: $10,100
Actual results:
In all the three scenarios, the total discount is $9,000.
Apply the patch
To apply individual patches, use the following links depending on your deployment method:
- Adobe Commerce or Magento Open Source on-premises: Quality Patches Tool > Usage in the Quality Patches Tool guide.
- Adobe Commerce on cloud infrastructure: Upgrades and Patches > Apply Patches in the Commerce on Cloud Infrastructure guide.
Related reading
To learn more about Quality Patches Tool, refer to:
- Quality Patches Tool released: a new tool to self-serve quality patches in the support knowledge base.
- Check if patch is available for your Adobe Commerce issue using Quality Patches Tool in the Quality Patches Tool guide.
For info about other patches available in QPT, refer to Quality Patches Tool: Search for patches in the Quality Patches Tool guide.