Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Make all products taxable at once????


Ch3W

Recommended Posts

Posted

Hi there,

 

We have a large list of products and need to make them all taxable. Obviously making them all taxable individually would be very time consuming. Does anybody know of a quick way of doing it?

If not, does anyone know what part of the database is changed to add tax to a product?

 

I really hope somebody can help.

 

Thanks,

-=[Ch3W]=-

Posted

Hi,

yes there is an easy way to do this

 

but do a database back up before you do

 

go into the PHP myadmin are

 

once in there click on the table "products" on the left

 

then look to the right

and find "products_tax_class_id"

 

write down what it comes after, in my database it comes after

"products_status "

 

also write down it's int, in my case it's int(5) it could be int(11)

 

 

click on the radio button to the left of it and hit "drop"

 

like I said have a backup before you do this

 

once you droped it you won't have a tax class for any of your products

 

so now what you do is scroll down and find

"Add new field" it should have "1" in the box, leave it like that, and click the drop down box to place it after (where it was before in my case it was after "products_status "

 

hit go

 

 

a new page will come up

 

in "field" type products_tax_class_id

the drop down box for "type" click on INT

in the box "Length/Values*" put in the number you had before I had 5,

it's possable you could have 11 (if you have only 2 tax clases 5 is fine)

 

ok now in "Default" put the number 1

 

or what ever number you want ALL the products to have for a class

 

if you have the system "none taxable" and "taxable goods"

and your wanting to make all your products "taxable goods" then the number ONE is the correct entry.

 

leave everything else alone

 

and hit SAVE

 

 

Now all your products will be taxable goods

 

 

AND when you enter a new product via the admin

the default will be "taxable goods"

 

 

Let me know how you do on this

 

it's easy to mess up your database

so BACK IT UP

 

 

have fun

Sean

Posted

Thanks for the detailed answer.

This will need to be done on a regular basis as the product properties are purged every week or so.

I'll make a php script to do what you explained.

 

Cheers.

 

Ch3W

-=[Ch3W]=-

Posted

Maybe I'm wrong but if you want to make all products taxable, wouldn't it be wasier to find the tax_id # you want to place on these items then go to your MySQL database and do a general update like this?

 

Let's say Tax_ID is 1

 

UPDATE products SET products_tax_class_id = 1

 

This should update all product_tax_class_id fields in each record to the value 1 which hypothetically is the taxable code you want.

 

However, before doing so, BACKUP your database!

 

Dave

http://www.netfrog.ca

Make it your next Internet hop!

Posted

WOW

you know I don't have a PHD in PHP

 

and just that's how I have been doing things.

 

I see your a rocket scientist!!!

 

Thanks for the info!!

 

:oops:

I really mean it...THANKS

 

have fun

Sean

Posted

Glad to have helped!

 

Later,

 

Dave ...

 

BTW .. that UPDATE statement is SQL language not PHP .. unfortunately, I know squat about PHP ... YET!

http://www.netfrog.ca

Make it your next Internet hop!

  • 2 years later...
Posted
Glad to have helped!

Later,

Dave ...

BTW .. that UPDATE statement is SQL language not PHP .. unfortunately, I know squat about PHP ... YET!

 

 

Wow, man.. you just save me a crap load of time... thanks for the great sql tip. :)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...