ACSD-63062: Incorrect cart discount calculations with multiple overlapping rules
The ACSD-63062 patch fixes the issue where incorrect cart discount calculations occur when multiple overlapping rules are applied. This patch is available when the Quality Patches Tool (QPT) 1.1.56 is installed. The patch ID is ACSD-63062. Please note that the 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.7-p2
Compatible with Adobe Commerce versions:
Adobe Commerce (all deployment methods) 2.4.7 - 2.4.7-p3
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
Incorrect cart discount calculations occur when multiple overlapping rules are applied.
Steps to reproduce:
-
Install fresh instance with sample data.
-
Create three simple products:
- simple1: $1080
- simple2: $260
- simple3: $280
-
Create four Cart Price Rules as follows:
-
Rule 1:
- Priority: 100
- Conditions tab: Use simple2 ($280) product if total qty equals or is greater than 3
- Actions tab: SKU is simple2
- Fixed Amount Discount: $80
-
Rule 2:
- Priority: 200
- Actions tab: SKU is simple2
- Percentage of Product Price Discount: 20%
-
Rule 3:
- Priority: 300
- Conditions tab: Subtotal equals or is greater than $1000
- Fixed Amount Discount for the whole cart: $100
-
Rule 4:
- Priority: 400
- Conditions tab: Use simple1 ($1080) product if total qty equals or is greater than 2
- Actions tab: SKU is simple1
- Fixed Amount Discount for the whole cart: $960
-
-
Go to the storefront and add the following products with given quantity to the cart:
- simple1 = 2
- simple2 = 1
- simple3 = 3
-
Check the shopping cart.
Expected results:
The discount applied is $1352.
Actual results:
The discount applied is $1525.33.
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: A self-service tool for quality patches in the Tools guide.