Forums / General Questions / Add VAT to all Products (Apart from one Category)

Add VAT to all Products (Apart from one Category)

Views: 584

Results 1 to 3 of 3
6 Mar 2012, 11:45 AM
#1
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Add VAT to all Products (Apart from one Category)

We've just registered for VAT so we need to add VAT to all products, site wide, apart from a sepcific category.

I have an SQL query that's switch it on across the board:```php
UPDATE products set products_tax_class_id = 1 where products_tax_class_id = 0;


How would I exclude category 350 from this query?  Would really appreciate any help here.
6 Mar 2012, 1:05 PM
#2
davowave avatar

davowave

New Zenner

Join Date:
Mar 2009
Posts:
90
Plugin Contributions:
0

Re: Add VAT to all Products (Apart from one Category)

I'm not so hot on SQL but if you use easy-populate then you could do it easily with that. Most ppl seem to have easy-populate installed :)

6 Mar 2012, 3:48 PM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Add VAT to all Products (Apart from one Category)

If that is the master_categories_id on the Products you can use:

UPDATE products set products_tax_class_id = 1 where products_tax_class_id = 0 and master_categories_id != 350;  

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!