Page 1 of 1

[SOLVED] - Change VAT for specific category

Posted: Wed Jan 08, 2020 9:23 pm
by nbdevelopdreece
Hello everyone! :D

TL;DR: Change VAT for items in a specific category.

There is the need for a change in VAT in the cart/checkout page. If the product only contains products from a specific category, then change/reduce VAT to a fixed value.

Example 1: if cart has 4 products from category "helmets", change VAT to 5%.
Example 2: if cart has 2 products from category "helmets" and 1 product from category "gloves", leave VAT unchanged.
Example 3: if cart has 1 product from category "helmets", change VAT to 5%.
Example 4: if cart has 1 product from category "gloves", leave VAT unchanged.

Is it possible? Any ideas? Could anyone point me to the right direction? Thank you in advance.

Re: Change VAT for specific category

Posted: Wed Jan 08, 2020 10:18 pm
by uksitebuilder
That makes little sense.

Products are taxable at a set rate, based on whether they are for import or export, not determined by which category they belong to.

One thing you do not want to do is fall foul of the taxman.

Re: Change VAT for specific category

Posted: Wed Jan 08, 2020 10:53 pm
by by mona
ditto above ..

tax is product based, so there is no reason why you are proposing a complicated structure, unless you are asking for a quick way to update all the tax in a category rather than do it by product.

This tutorial explains how to set up your tax
https://code.tutsplus.com/tutorials/und ... -cms-25106

Re: Change VAT for specific category

Posted: Thu Jan 09, 2020 6:47 pm
by paulfeakins
nbdevelopdreece wrote:
Wed Jan 08, 2020 9:23 pm
Any ideas?
No ideas, only questions: What are you doing and why? :laugh:

Re: Change VAT for specific category

Posted: Mon Feb 17, 2020 6:51 pm
by nbdevelopdreece
paulfeakins wrote:
Thu Jan 09, 2020 6:47 pm
nbdevelopdreece wrote:
Wed Jan 08, 2020 9:23 pm
Any ideas?
No ideas, only questions: What are you doing and why? :laugh:
I want to change the tax rate based on category because of a new law stating that helmets, children car seats and other safety items must be sold with a lower VAT.

Re: Change VAT for specific category

Posted: Mon Feb 17, 2020 6:54 pm
by nbdevelopdreece
Replying to the other comments above,
Thank you for your replies.

I ended up changing the Tax class in the database of each product (product table) based on the category (product_category table) it is in (after creating a new tax class).

Re: [SOLVED] - Change VAT for specific category

Posted: Thu May 09, 2024 9:13 pm
by mpikkis
Hi, i am really interested for this also. could you elaborate how u did it ?
Thanks

Re: [SOLVED] - Change VAT for specific category

Posted: Thu May 09, 2024 10:02 pm
by paulfeakins
mpikkis wrote:
Thu May 09, 2024 9:13 pm
Hi, i am really interested for this also. could you elaborate how u did it ?
Thanks
I think this is pretty clear:
"I ended up changing the Tax class in the database of each product (product table) based on the category (product_category table) it is in (after creating a new tax class)."

So they probably wrote an SQL query that updated the tax class of each product that was in a certain category.

Writing such a query wouldn't be too tricky.

Re: [SOLVED] - Change VAT for specific category

Posted: Thu May 16, 2024 6:42 pm
by mpikkis
Oh right, my mistake, i got it wrong. I wanted to change VAT for specific category, but for specific customer group ONLY

Re: [SOLVED] - Change VAT for specific category

Posted: Thu May 16, 2024 9:32 pm
by paulfeakins
mpikkis wrote:
Thu May 16, 2024 6:42 pm
Oh right, my mistake, i got it wrong. I wanted to change VAT for specific category, but for specific customer group ONLY
Not possible without an extension because tax classes are based on products and geo zones.

Re: [SOLVED] - Change VAT for specific category

Posted: Thu May 16, 2024 10:04 pm
by ADD Creative
mpikkis wrote:
Thu May 16, 2024 6:42 pm
Oh right, my mistake, i got it wrong. I wanted to change VAT for specific category, but for specific customer group ONLY
You can edit the Tax Rates and select which customer groups they apply to.

Re: [SOLVED] - Change VAT for specific category

Posted: Thu May 16, 2024 10:51 pm
by paulfeakins
ADD Creative wrote:
Thu May 16, 2024 10:04 pm
mpikkis wrote:
Thu May 16, 2024 6:42 pm
Oh right, my mistake, i got it wrong. I wanted to change VAT for specific category, but for specific customer group ONLY
You can edit the Tax Rates and select which customer groups they apply to.
Are you sure? I can't see where that is in the admin?

Re: [SOLVED] - Change VAT for specific category

Posted: Thu May 16, 2024 10:57 pm
by paulfeakins
Ah I've had another look so in System > Localisation > Taxes > Tax Rates > Edit you can untick a tax rate for a Customer Group.

So it can be done without an extension, that's cool.