Skip to content

Cart Price rule discounts incorrect value when shipping is included and an item in the cart is non-taxable #39531

Open
@techsteamdesk

Description

@techsteamdesk

Preconditions and environment

  1. Magento Open Source 2.4.6-p8 without sample data is installed.
  2. No custom modules or theme customisation
  3. Default Luma theme
  4. Set up tax rules and tax rates and zones with a tax rate of 20% for all UK Addresses.
  5. Set up the sales > tax configuration as per the attached screenshot. Note that there are no warnings of tax rounding errors.
  6. Create a some new products. Create two simple products one that is taxable and one that is not. Create a configurable product with taxable and non-taxable child products. Add all the products to a test category.
  7. Set up and enable the flat rate shipping method for £4.80.
  8. Create a Cart Price rule that applies a fixed value to the whole cart up to £60 and has the ‘Apply to Shipping Amount’ setting set to yes. See attached screenshot for details.
Screenshot 2025-01-09 at 3 46 33 PM Screenshot 2025-01-10 at 10 10 25 AM

Steps to reproduce

  1. Navigate to storefront as a guest.
  2. Open Test Category.
  3. Click "Add to Cart" on a Product that is not taxable.
  4. Open mini shopping cart and click "View and edit cart".
  5. Change the quantity in cart so that it exceeds the £60 coupon discount.
  6. Apply the previously configured coupon code.

Expected result

Order is discounted by £60

Actual result

Order is discounted by a different amount.
Screenshot 2025-01-10 at 10 06 58 AM

Additional information

If you change the product in the cart to one that is taxable with otherwise identical conditions the Order is correctly discounted by £60:
Screenshot 2025-01-10 at 10 13 13 AM

However any combination of products in the cart that include a tax free product causes the discount to be incorrect:
Screenshot 2025-01-10 at 10 16 38 AM

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: TaxComponent: TaxIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.Reported on 2.4.6-p8Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions