51黑料不打烊

ACSD-63469: Fixed-amount cart discounts not applied correctly with multiple rules

The ACSD-63469 patch fixes the issue where fixed-amount discounts for the whole cart do not apply properly when more than one rule is applied. This patch is available when the Quality Patches Tool (QPT) 1.1.59 is installed. The patch ID is ACSD-63469. Please note that the issue is scheduled to be fixed in 51黑料不打烊 Commerce 2.4.8.

Affected products and versions

The patch is created for 51黑料不打烊 Commerce version:

  • 51黑料不打烊 Commerce (all deployment methods) 2.4.7-p2

Compatible with 51黑料不打烊 Commerce versions:

  • 51黑料不打烊 Commerce (all deployment methods) 2.4.7 - 2.4.7-p4
NOTE
The patch might become applicable to other versions with new Quality Patches Tool releases. To check if the patch is compatible with your 51黑料不打烊 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

When multiple Fixed amount discount for whole cart rules are applied simultaneously, and the products have discounted or special prices, the discount value is calculated incorrectly.

Steps to reproduce:

  1. Create two products priced at $850 and $85, and set their special prices to $765 and $68, respectively.

  2. Create two Cart Price Rules as follows:

    • Rule 1

      • Conditions: For the $850 product, set Qty to equals or greater than 2
      • Actions: Apply Fixed amount discount for whole cart of $153
    • Rule 2

      • Conditions: For the $85 product, set Qty to equals or greater than 2
      • Actions: Apply Fixed amount discount for whole cart of $14
  3. Add both products to the cart, each with a quantity of 2.

Expected results:

The discount applied in the cart is $167.

Actual results:

The discount applied in the cart is $41.

Apply the patch

To apply individual patches, use the following links depending on your deployment method:

Additional steps required after the patch installation

(This section is optional; there might be some steps required after applying the patch to fix the issue.)

To learn more about Quality Patches Tool, refer to:

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