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
NOTE
The patch might become applicable to other versions with new Quality Patches Tool releases. To check if the patch is compatible with your Adobe Commerce version, update the 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:

  1. Free Shipping = Enabled
  2. Minimum Order Amount = 99999999

Needed categories:

  1. Category Test 1
  2. Category Test 2

Needed products:

  1. Product Test 1:

    1. Categories: Category Test 1
    2. Price: $ 45
  2. Product Test 2:

    1. Categories: Category Test 2
    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:

  1. Rule Name: Test Free Shipping
  2. Active: Yes
  3. Websites: Main Website
  4. Customer Groups: NOT LOGGED IN, General, Wholesale, Retailer
  5. Coupon: No Coupon
  6. Uses per Customer: 0
  7. 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:

  1. Log in to the store front.
  2. Add Product Test 1.
  3. Add two quantities of Product Test 2.
  4. Visit cart.
  5. 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:

To learn more about Quality Patches Tool, refer to:

recommendation-more-help
commerce-operations-help-tools