ACP2E-3841: Cart price rules for multi-shipping products do not apply correctly when subselect conditions are used and free shipping is enabled
The ACP2E-3841 patch fixes the issue where cart price rules for multi-shipping products do not apply correctly when subselect conditions are used and free shipping is enabled. This patch is available when the Quality Patches Tool (QPT) 1.1.64 is installed. The patch ID is ACP2E-3841. Please note that this issue is scheduled to be fixed in Adobe Commerce 2.4.9.
Affected products and versions
The patch is created for Adobe Commerce version:
- Adobe Commerce (all deployment methods) 2.4.6-p9
Compatible with Adobe Commerce versions:
- Adobe Commerce (all deployment methods) 2.4.5 - 2.4.7-p5
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 rules for multi-shipping products do not apply correctly when subselect conditions are used and free shipping is enabled.
Prerequisites:
Settings:
- Free Shipping = Enabled
- Minimum Order Amount = 99999999
Needed categories:
- Category Test 1
- Category Test 2
Needed products:
-
Product Test 1:
- Categories: Category Test 1
- Price: $ 45
-
Product Test 2:
- Categories: Category Test 2
- Price: $ 56.25
(Prices must be the same as shown here to ensure the test works correctly.)
Cart Price Rule:
Log in as an admin and go to Marketing > Promotions > Cart Price Rules > Add new rule. Use these values:
Rule Information:
- Rule Name: Test Free Shipping
- Active: Yes
- Websites: Main Website
- Customer Groups: NOT LOGGED IN, General, Wholesale, Retailer
- Coupon: No Coupon
- Uses per Customer: 0
- Priority: 1
Conditions:
If ALL of these conditions are TRUE:
If total amount (incl. tax) equals or greater than 100 for a subselection of items in cart matching ALL of these conditions:
Category is 5,12,13
Actions:
Percent of product price discount = 10
Steps to reproduce:
- Log in to the store front.
- Add Product Test 1.
- Add two quantities of Product Test 2.
- Visit cart.
- Select Check Out with Multiple Addresses.
Expected results:
No errors.
Actual results:
500 error
Message: Deprecated Functionality: Implicit conversion from float 112.5 to int loses precision in /app/code/Magento/SalesRule/Model/Rule/Condition/Product/Subselect.php on line 214
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.