AC-11389: Order totals vary based on the order products are added to the cart

The AC-11389 patch fixes the issue where discounts, taxes, and order totals are calculated incorrectly in some rounding scenarios. This patch is available when the Quality Patches Tool (QPT) 1.1.83 is installed. The patch ID is AC-11389. 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.8-p3

Compatible with Adobe Commerce versions:

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

Discounts, taxes, and order totals are calculated incorrectly in some rounding scenarios.

Prerequisites:

Create sample products: (For example: product1(hat), product2(jacket))

Steps to reproduce:

  1. Use a store with a 22% tax rate, a 10% cart discount, a hat with a special price of $733.61, and a jacket with a special price of $569.67.
  2. Add three hats and two jackets to the cart, then repeat with the products added in reverse order.
  3. Select Checkout, enter a shipping address in the country where the tax rate applies, apply the discount code, and place the order.

Expected results:

The order total is $3667.52 for either product order.

Actual results:

The order total is $3667.51 when the hats are added first and $3667.50 when the jackets are added first.

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