ACSD-59865: Cart Price Rule fails to cancel previous rules due to insufficient product quantity

The ACSD-59865 patch fixes the issue where the Discount quantity step value in Fixed amount discount, Percent of product price discount, and Buy X get Y Cart Price Rules no longer cancels the action of previous rules. This patch is available when the Quality Patches Tool (QPT) 1.1.52 is installed. The patch ID is ACSD-59865. 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.6-p1

Compatible with Adobe Commerce versions:

  • Adobe Commerce (all deployment methods) 2.4.4 - 2.4.6-p7
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

The Cart Price Rule fails to cancel previously applied rules due to an insufficient product quantity in the cart.

Steps to reproduce:

  1. Log in as an admin.

  2. Go to Marketing > Cart Price Rules and click on Add New rule.

    • Set Rule Name = Test - 1

    • Select all Websites and Customer groups

    • Set Priority = 0

    • Go to the Actions section:

      • Set Apply = Percent of product price discount
      • Set Discount amount = 10
      • Set Maximum Qty Discount is Applied To = 100
      • Set Discount Qty Step (Buy X) = 0
      • Set Discard subsequent rules to No
  3. Clear the cache.

  4. Go to the Storefront, add one item to the cart, and proceed to checkout/cart.

  5. Verify that the 10% discount is applied to your cart.

  6. Return to the Cart Price Rules and create a new rule.

    • Set Rule Name = Test - 2

    • Select all Websites and Customer Groups

    • Set Priority = 2

    • Navigate to the Actions section:

      • Set Apply = Percent of product price discount
      • Set Discount amount = 20
      • Set Maximum Qty Discount is Applied To = 100
      • Set Discount Qty Step (Buy X) = 3
  7. Clear the cache.

  8. Go back to the Storefront again.

  9. Update the cart to refresh the rules. Verify that the 10% discount is no longer applied.

  10. Add items to your cart until the quantity meets the Step value required for the second rule.

Expected results:

The first Cart Price Rule is applied when the conditions of second rule are met.

Actual results:

Price rules are applied as configured in the admin dashboard.

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:

For info about other patches available in QPT, refer to Quality Patches Tool: Search for patches in the Quality Patches Tool guide.

recommendation-more-help
c2d96e17-5179-455c-ad3a-e1697bb4e8c3