Jump to content

How to change Tax option on each produts....mysql?


Recommended Posts

Hi there, 

 

Hope this is the right place to post issues.

 

Please help me resolve this issue.  I need to put taxes to all the products that are uploaded automatic to my store.  There are over 1000 products and its frustrating to do one on one.  I have been doing a lot of research to find if we can do it in backend.   There is an option in each product that has "no tax" and "sales tax".  I have to individually go to each product and choose "sales tax" option. 

 

I see there is one solution that can solve this issue thru mySqlAdmin.  But I don't know how to do step by step.  Is there anyone who can explain the steps to change this please!

 

I have the latest Prestashop 1.5.6.1.

 

Thank you!!

 

 

Link to comment
Share on other sites

Anyone plz help!  :(

 

Some Moderator from a previous post replied long back:

 

in mySqlAdmin

click on SQL
and write:
UPDATE ps_product SET id_tax='3'

and the job is done.

Consider:
ps_ is the prefix of your db, if not change it
'3' is your tax id (only see the number in back office payment - taxes)
BEFORE: make a backup of your DB!

 

I already tried this but its not updating the store.  Please Help!

Link to comment
Share on other sites

Hi,
Massively change of "sales tax" option is possible via import/export, though it requires from you some time and changes in the file.
But alternatively you can check Store Manager for Prestashop solution. It has built-in Mass Product Changes option to perform bulk changes of products details and inventory.
There is 4-weeks fully functional version of Store Manager for Prestashop so you can give it a try.
Here is tutorial with video -
http://www.youtube.com/watch?v=tLea3lAYJTw

and documentation:

http://store-manager-for-prestashop-documentation.emagicone.com/mass-changers/mass-product-changer

Link to comment
Share on other sites

Don't do it yourself if you are not familiar with SQL queries. It can crash your site. It is a job for 30 minutes for an expert.

 

For v1.5.6.1 there is another table to mention: ps_product_shop.

 

Hi Tuk66,

 

Thank you for replying back.  I have already made chages to SQL and it has updated my tax id

UPDATE ps_product SET id_tax='56'  (It said it updated the changes to 1000 products but seems like nothing worked)

 

and then I made this change:

 

From:

                <option value="{$tax_rules_group.id_tax_rules_group}" {if $product->getIdTaxRulesGroup() == $tax_rules_group.id_tax_rules_group}selected="selected"{/if} >

 

To:

<option value="{$tax_rules_group.id_tax_rules_group}" {if $tax_rules_group.id_tax_rules_group == 56}selected="selected"{/if} >

 

with the 56 being the id of the tax rule that you would like to be the default.  (http://www.prestashop.com/forums/topic/202105-change-selected-tax-rule-in-backoffice/)

 

 

Because of this change I have the default tax rule 56 which is "Sales tax" instead of default tax rule "=No Tax", which is great.  That's what I wanted and the update works on all products. 

 

But the problem is I have to individually go to all products and save the changes, to make this work on the store in order for tax to show.   There are more than 1000 products which is automated everyday.  Don't know what is missing.  I am very close to the solution yet can't solve it. 

 

You mention something about ps_product_shop.  Can you please let me know what I have to do for it to show changes to my tax option.

 

Really appreciate your help!

 

Thanks.

Link to comment
Share on other sites

Thank you Constantino for replying back with the information.  I will definatly look into this.  I hope I am close to the solution above, if not then will look into this.  Seems like this will take some time to understand, and I don't have much time.  :(

 

Thanks again!

 

 

Hi,
Massively change of "sales tax" option is possible via import/export, though it requires from you some time and changes in the file.
But alternatively you can check Store Manager for Prestashop solution. It has built-in Mass Product Changes option to perform bulk changes of products details and inventory.
There is 4-weeks fully functional version of Store Manager for Prestashop so you can give it a try.
Here is tutorial with video -
http://www.youtube.com/watch?v=tLea3lAYJTw

and documentation:

http://store-manager-for-prestashop-documentation.emagicone.com/mass-changers/mass-product-changer

Link to comment
Share on other sites

Don't do it yourself if you are not familiar with SQL queries. It can crash your site. It is a job for 30 minutes for an expert.

 

For v1.5.6.1 there is another table to mention: ps_product_shop.

 

Thank you sooo much Tuk66!!! :)   It worked!  I updated the ps_product_shop and it worked finally! 

UPDATE `ps_product_shop` SET `id_tax_rules_group` = '56'

 

Its calculating the tax finally!! :) .

Link to comment
Share on other sites

The above code solves all the products that are already in the store to show with tax in the cart.

 

:( As my new products are automated to my site, I don't see tax showing up again.  Instead of going and redoing each time the above code each day, can I create this automatically to set it up  with tax showing on all products. 

 

Anyone please?

Link to comment
Share on other sites

  • 3 years later...
×
×
  • Create New...