Skip to content

[4.x]: Commerce discounts applying before tax?  #3100

@robzor

Description

@robzor

What happened?

Description

Hi there,

We have a Commerce store with products that either have 20% tax or 0% tax so we have a VAT tax rule of 20%:

CleanShot 2023-02-28 at 2 57 12

If we create a discount, for example, 30% off:

CleanShot 2023-02-28 at 2 58 00

If a customer adds products to their cart (note: the majority of our products do have VAT tax applied), then the discount gets applied to the cart price before tax is added. So with a £50 (inc. VAT) product, a customer who applies the 30% off voucher expects to get £15 off, but instead only gets £13 off. Here is an example of the cart with both VAT and non-VAT products in:

CleanShot 2023-02-28 at 2 59 57

Is it possible that we can set it that Commerce discounts apply after tax?

All prices on the site are displayed including tax (this is the norm in the UK) so the client (and customers) are struggling to understand why the discount is not 'what is expected'.

Steps to reproduce

  1. Create tax category of 20%
  2. Create discount of 30% off (Per Item Percentage Off)
  3. Add items to basket
  4. Add discount code

Expected behavior

Discount applies after VAT is added

Actual behavior

Discount applies before VAT is added

Craft CMS version

4.3.10

Craft Commerce version

Pro 4.2.5.1

PHP version

No response

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions