Jump to content

How to apply same tax rule on all products quickly?


 Share

Recommended Posts

If you know mysql, it is the field id_tax_rules_group in the ps_product table.

 

Else you can use my module ExportCatalog ( available on the add ons : http://addons.prestashop.com/fr/export/2987-exportcatalogue.html ) : it exports product fields ( ID, name, reference, price, tax rule, manufacturer... ) in a CSV file so you can edit it in excel ( or another spreadsheet application ) and import your changes in Prestashop ( I wrote a documentation on import, it is includes in the module documentation).

Share this post


Link to post
Share on other sites

  • 3 weeks later...

This problem forced me to learn sql......

I ended up doing it with an sql command.

update ps_product set id_tax_rules_group = insert correct number here.

 

Would be nice to have a global change in PrestaShop. Its crazy to have to update hundreds of products manually.

  • Like 1

Share this post


Link to post
Share on other sites

  • 7 months later...

hey guys, i have all products without taxes, now i want update the current price of each product "as taxed" and i would prestashop automatically add the price without vat too in the relative field based on the current... How to?

Share this post


Link to post
Share on other sites

If you use .csv to import products you can give it the "ID number" of the tax rule.

like this:

"product ID","Product name","price excl. tax","1"

 

1 --> The ID number of the tax rule..

 

Gives all products with a number 1 as Tax rule the percentage set as ID 1 in your BO!

 

Cheers Helldog

Share this post


Link to post
Share on other sites

My problem is this, i would mantein the current price i inserted in the field "price exc. vat" as price with VAT, so prestashop should calculate the price without VAT, how is possible? Thanks

Share this post


Link to post
Share on other sites

  • 7 months later...

I tried that last solution...

it works find in the BDD, but the price stay the same in the website and in the back office !

It is 5.3 prestashop... Is there any cache or something ?

I've got only 1 taxe and 1 taxe rule ...?!!!

any idea ?

Share this post


Link to post
Share on other sites

I tried that last solution...

it works find in the BDD, but the price stay the same in the website and in the back office !

It is 5.3 prestashop... Is there any cache or something ?

I've got only 1 taxe and 1 taxe rule ...?!!!

any idea ?

 

You should run the same query but also to the ps_product_shop table.

 

UPDATE ps_product_shop SET id_tax_rules_group = 1 WHERE id_tax_rules_group = 0

 

Greetings.

  • Like 6

Share this post


Link to post
Share on other sites

  • 2 months later...

Is it posible to add quantity to all items via query? Can you post a command?

 

Also would be nice a link to the tutorial how to execute this commands in phpmyadmin for newbies like me :)

 

Thanks,

Share this post


Link to post
Share on other sites

  • 3 months later...
  • 1 year later...
  • 5 months later...

My solution work on 1.6:

update ps_product set id_tax_rules_group = '{tax_rule_id}';
update ps_product_shop set id_tax_rules_group = '{tax_rule_id}';

{tax_rule_id} = is id of TAX RULE

 

This will change tax_rule in all products!!

  • Like 3

Share this post


Link to post
Share on other sites

  • 2 months later...
  • 5 weeks later...

Hi, I have a client that has not selected a tax for any of the products (there are hundreds of them!)

 

I tried the query and it works but my problem is that all the prices that they have put already include the tax and when I do the query it adds the tax onto this.

 

Is there a way to update the tables in this situation?

 

Thanks

Share this post


Link to post
Share on other sites

Thanks sigmaconcept but this adds the tax on to the price that is already there and my problem is that the prices put in the products have been added with tax but no tax rate has been selected.

We have a VAT rate here of 21 % so I don't know id it's possible to do a division query to divide the prices by 1.21 to get the pre VAT prices and then do the other query stated above.

 

I'm pretty useless at SQL and don't know if this is possible?

Share this post


Link to post
Share on other sites

Sure,

 

UPDATE ... price = price/1.21 ...

 

works, but you need to know what prices to change. Usually there is more than one price in more than one table.

Share this post


Link to post
Share on other sites

  • 5 months later...
  • 1 month later...
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More