Zen Cart Logo
Forums / Currencies & Sales Taxes, VAT, GST, etc. / Change all products to taxable goods

Change all products to taxable goods

Views: 19,666

Results 21 to 36 of 36
24 Jul 2014, 12:46 PM
#21
ajeh avatar

ajeh

Oba-san

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

Change all products to taxable goods

Assuming the Tax Class Id that you want is 1, you could use:

UPDATE products SET products_tax_class_id = 1 WHERE master_categories_id = XX;

where XX is the master_catgegories_id that you want changed ...

You could set one Product manually then check in phpMyAdmin for this products_id in the table:
products

to confirm the settings that you should use for products_tax_class_id and master_categories_id ...

10 Nov 2014, 5:15 PM
#22
phillyphoto avatar

phillyphoto

New Zenner

Join Date:
Oct 2009
Location:
Philly
Posts:
8
Plugin Contributions:
0

Re: Change all products to taxable goods

How do you set it so that all newly added products are automatically Taxable Goods. I used phpmysql to set the default for products_tax_class_id As Defined with a value = 1 . When I add a new product after the change, I expected that the value would be set to "Taxable Goods" but it still defaults to a blank field. Why am I doing wrong? Do I have to reset something?

10 Nov 2014, 5:34 PM
#23
ajeh avatar

ajeh

Oba-san

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

Re: Change all products to taxable goods

Go to the Catalog ... Product Types ... and hit EDIT LAYOUT ... then change the setting on:

Product Price Tax Class Default - When adding new products?
What should the Product Price Tax Class Default ID be when adding new products?

11 Jan 2015, 7:04 PM
#24
infobrushes avatar

infobrushes

New Zenner

Join Date:
Jan 2015
Location:
Viet nam
Posts:
1
Plugin Contributions:
0

Re: Change all products to taxable goods

thanks tut

2 Aug 2015, 2:19 PM
#25
dkp1 avatar

dkp1

New Zenner

Join Date:
Aug 2015
Location:
NY not the city
Posts:
9
Plugin Contributions:
0

Re: Change all products to taxable goods

Ajeh:

Go to the Catalog ... Product Types ... and hit EDIT LAYOUT ... then change the setting on:

so lets say I need to have some categories taxed and others not taxed could I duplicate the general product under product types calling it something else and change the default tax leaving everything else the same and then change the product type by category to whatever I need or is there another way?

2 Aug 2015, 3:28 PM
#26
ajeh avatar

ajeh

Oba-san

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

Re: Change all products to taxable goods

To duplicate Product General you would need build all of the files for the Admin and the Catalog associated with Product Types ... this would allow you to then have settings for your Taxable and Non-Taxable Products and any other controls or display for the two product types as you need them ...

This may or may not seem like a lot of work just to manage when the Taxable setting is defaulted on creating a Product ... You would need to remember which to use when creating the Product or set the Categories to manage which Product Type is used when creating Products ...

Otherwise, using the Product General and just setting the Taxable setting correctly might be easier ... maybe just customizing the define for the Tax Class:

define('TEXT_PRODUCTS_TAX_CLASS', '<span class="alert"><strong>Tax Class:</span></strong>');

in the language file to make it more pronounce so folks pay attention is easier ... :lookaroun

2 Aug 2015, 3:39 PM
#27
dkp1 avatar

dkp1

New Zenner

Join Date:
Aug 2015
Location:
NY not the city
Posts:
9
Plugin Contributions:
0

Re: Change all products to taxable goods

Ajeh:

..

... You would need to remember which to use when creating the Product or set the Categories to manage which Product Type is used when creating Products ...

the plan was to set the categories so I do not have to deal with this all the time as new products are constantly being added by my drop shipper.
I just wanted to make sure this was doable before going down this road.

so as long as I set the categories to the correct product type to match the needed tax class it will automatically set all new products in that category to that tax class?

2 Aug 2015, 4:06 PM
#28
ajeh avatar

ajeh

Oba-san

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

Re: Change all products to taxable goods

You can test it by changing the setting in one of the other Product Types like Document Product to be Taxable or Non-Taxable and see how it works to check what the effect would be of the new Product Type that you create ...

2 Aug 2015, 4:44 PM
#29
dkp1 avatar

dkp1

New Zenner

Join Date:
Aug 2015
Location:
NY not the city
Posts:
9
Plugin Contributions:
0

Re: Change all products to taxable goods

Ajeh:

You can test it by changing the setting in one of the other Product Types like Document Product to be Taxable or Non-Taxable and see how it works to check what the effect would be of the new Product Type that you create ...

thats what I am doing now we will se I will post if it works so others know.

by the way thank you for posting the code to change products in each category that works great.

2 Aug 2015, 5:11 PM
#30
ajeh avatar

ajeh

Oba-san

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

Re: Change all products to taxable goods

You are most welcome ... let us know how things work out for you if you decide to build a new Product Type! :smile:

1 Aug 2016, 1:24 PM
#31
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Location:
eglisau switzerland
Posts:
568
Plugin Contributions:
0

Re: Change all products to taxable goods

Thanks for this SQL patch; UPDATE products SET products_tax_class_id=1;

Works great but ...

I currently have my prices set as "tax included" and tax class "none" so today on the product set up page each of my "net price" is the same as my "gross price"

When I run this patch it, of course, causes the tax to be added to my net price to create a new gross price which is too high.

This seems like an issue other people will have run into but I did not find a solution anywhere?

I suppose I could write an SQL patch to copy each of the net prices to the gross price box and then recalculate the net prices, does not seem too elegant a solution?

1 Aug 2016, 5:24 PM
#32
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Change all products to taxable goods

marton_1:

Thanks for this SQL patch; UPDATE products SET products_tax_class_id=1;

Works great but ...

I currently have my prices set as "tax included" and tax class "none" so today on the product set up page each of my "net price" is the same as my "gross price"

When I run this patch it, of course, causes the tax to be added to my net price to create a new gross price which is too high.

This seems like an issue other people will have run into but I did not find a solution anywhere?

I suppose I could write an SQL patch to copy each of the net prices to the gross price box and then recalculate the net prices, does not seem too elegant a solution?
The patch provided doesn't take into account the very unusual action of changing the entire store from tax-added to tax-included. That requires manual editing of each price to remove the tax component, because it still adds the tax at checkout (just displays it differently).

1 Aug 2016, 7:11 PM
#33
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Location:
eglisau switzerland
Posts:
568
Plugin Contributions:
0

Re: Change all products to taxable goods

OK, thanks

1 Aug 2016, 8:42 PM
#34
vdecals avatar

vdecals

Zen Follower

Join Date:
Jun 2009
Location:
Sparta, TN
Posts:
166
Plugin Contributions:
0

Re: Change all products to taxable goods

I recall seeing something similar years ago. You may want to look at a couple of older threads on increasing and decreasing prices.
https://www.zen-cart.com/showthread.php?214133-Batch-change-all-the-prices&highlight=decrease+prices
https://www.zen-cart.com/showthread.php?79927-Increase-price-on-all-products-universally/page3

1 Aug 2016, 8:48 PM
#35
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Location:
eglisau switzerland
Posts:
568
Plugin Contributions:
0

Re: Change all products to taxable goods

Great thanks

I experimented with - UPDATE products SET products_price = products_price / (1 + tax rate)
Then ran the - UPDATE products SET products_tax_class_id=1;

Worked fine on my test site.

Now I just have to do the same with my attribute prices :shocking:

7 Aug 2016, 1:26 PM
#36
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Location:
eglisau switzerland
Posts:
568
Plugin Contributions:
0

Re: Change all products to taxable goods

DrByte:

The patch provided doesn't take into account the very unusual action of changing the entire store from tax-added to tax-included. That requires manual editing of each price to remove the tax component, because it still adds the tax at checkout (just displays it differently).

Was not really my idea, the tax authorities were pushing me to show the tax value on the invoice :(

Anyway turned out OK.

I ran Change tax category "UPDATE products SET products_tax_class_id=1;"
The few products in a different tax class I changed manually to tax_class_id=2

Then I ran "UPDATE products SET products_price = products_price /(1 plus tax rate) WHERE products_tax_class_id=1;"
Did the same for tax_class_id=2

Then I ran Fix tax in attribute prices; "UPDATE products_attributes SET options_values_price = options_values_price/(1 plus tax rate) WHERE options_values_price <> '0';"

Then I ran Fix tax in specials prices; "UPDATE specials SET specials_new_products_price = specials_new_products_price/(1 plus tax rate) WHERE specials_new_products_price <> '0';"

The few attributes and specials for tax rate 2 I changed manually, I could also have tried multiple WHERE statements.