ACSD-61799: The total discount is incorrectly calculated when multiple cart rules with Fixed amount…
The total discount is incorrectly calculated when multiple cart rules with Fixed amount discount for the whole cart are applied to a shopping cart. Quality patch ACSD-61799 for magento/module-sales-rule applies to Magento Open Source and Adobe Commerce 2.4.4 to 2.4.4-p18.
- Categories
- Shopping Cart
- Components
- magento/module-sales-rule
- Origin
- adobe-commerce-support
- Since QPT
- 1.1.54
Issue
The total discount is incorrectly calculated when multiple cart rules with Fixed amount discount for the whole cart are applied to a shopping cart.
Steps to reproduce
1. Create four products with a price of $1000. 1. Create three cart price rules without any conditions that give a $100 discount for the whole cart. 1. Create another cart price rule that gives a $100 discount for the whole cart, with a condition that prevents the rule from being applied. 1. Disable the rule. 1. Add three products to the shopping cart and observe the discount in the cart. 1. Add additional products to the cart and observe the discount in the cart. 1. Enable the disabled cart price rule. 1. Update the shopping cart page and observe the discount in the cart.
Adobe's page lists 2.4.4 - 2.4.4-p11 as compatible; the versions below are resolved from the current QPT constraints and are the ones the tool will offer.
Adobe scheduled the permanent fix for 2.4.8.
Install
Install the Quality Patches Tool with composer require magento/quality-patches, apply the prerequisites listed for all files applicable to your distribution and version first, then run vendor/bin/magento-patches apply ACSD-61799. On Cloud, add ACSD-61799 under stage.build.QUALITY_PATCHES in .magento.env.yaml.
For cweagans/composer-patches, choose a compatible version below and download the bundle. Copy its ACSD-61799/ folder into patches/composer/, merge composer.patches.json into composer.json, then run composer install. Bundle prerequisites the same way and list them first. Paths are relative to each package root, using the default -p1 level. Prefer local files when configuring composer-patches; a remote URL can change.
Patch files and compatible versions
magento/magento2-base >=2.4.4 <2.4.5
- Magento Open Source
- 2.4.4-p18, 2.4.4-p17, 2.4.4-p16, 2.4.4-p15, 2.4.4-p14, 2.4.4-p13, 2.4.4-p12, 2.4.4-p11, 2.4.4-p10, 2.4.4-p9, 2.4.4-p8, 2.4.4-p7, 2.4.4-p6, 2.4.4-p5, 2.4.4-p4, 2.4.4-p3, 2.4.4-p2, 2.4.4-p1, 2.4.4
- Adobe Commerce
- 2.4.4-p18, 2.4.4-p17, 2.4.4-p16, 2.4.4-p15, 2.4.4-p14, 2.4.4-p13, 2.4.4-p12, 2.4.4-p11, 2.4.4-p10, 2.4.4-p9, 2.4.4-p8, 2.4.4-p7, 2.4.4-p6, 2.4.4-p5, 2.4.4-p4, 2.4.4-p3, 2.4.4-p2, 2.4.4-p1, 2.4.4
- Patch file
- patches/os/ACSD-61799_2.4.4-p6.patch
- vendor/magento/module-sales-rule/Helper/CartFixedDiscount.php
- vendor/magento/module-sales-rule/Model/Rule/Action/Discount/CartFixed.php
- vendor/magento/module-sales-rule/Model/Validator.php
