What's new in Prestashop 1 7

Category: PrestaShop 1.7.x

People or companies who work with PrestaShop in Germany must adjust the VAT from 01.07.2020.

Now you have to work with 16% instead of 19%.
And if used, the 7% must also be converted to 5% VAT.

How do I change the VAT in the PrestaShop correctly?

Unfortunately, it is not enough to simply change the VAT rate from 19% to 16% in the admin panel.
The reason for this is that PrestaShop stores the net prices and not the gross prices in the database.

Therefore an adjustment in the database is necessary - however this adjustment is also possible for people with little MySQL knowledge.

 

Backup instructions:

First of all, a backup must be created; this is done with just a few clicks.

  1. Log in to phpmyadmin, usually accessible via the control panel of your hosting provider
  2. First click on "Export" in the navigation and select "Customized".
    Then mark the following 4 tables in the list:
    ps_product
    ps_product_shop
    ps_product_attribute
    ps_product_attribute_shop
    (You can also download them individually)
  3. Click on "OK" to start downloading the tables and save these files in a folder on your computer.

 

Change VAT from 19% to 16%:

  1. First open your PrestaShop admin panel in a new window (you will need phpmyadmin again in a moment).
    Click on Localization> Tax Rates and change the tax rate from 19% to 16%.
  2. In the overview for the tax rate, in which 19% is now entered, you will see an "ID" - make a note of this.
  3. Then go back to phpmyadmin and click on "SQL" in the navigation - an input window now opens.
  4. Simply copy and paste the following code into this input window:

update `ps_product` set price = (((price * 1.19) * 100) / 116.0) where id_tax_rules_group = X;

update `ps_product_shop` set price = (((price * 1.19) * 100) / 116.0) where id_tax_rules_group = X;

update `ps_product_attribute` set price = (((price * 1.19) * 100) / 116.0) where price <> 0 and id_product in (select id_product from ps_product where id_tax_rules_group = X);

update `ps_product_attribute_shop` set price = (((price * 1.19) * 100) / 116.0) where price <> 0 and id_product in (select id_product from ps_product where id_tax_rules_group = X);

 

Please note that you can use the X at the end of the lines with the ID noted earlier (see point 2).
Then click on OK - that's it, the net prices have been recalculated at 16% and will be transferred to PrestaShop.

 

Addition: Adjust VAT for graduated prices

The above steps of course only apply to the general prices in the shop.
If you use graduated prices (e.g. from 3 pieces only 1.50 € instead of 1.65 €), then these price details must also be adjusted.

PrestaShop also saves graduated prices as net prices, so these prices can also be easily re-entered as an SQL update.

SQL update for graduated prices to 16% VAT:

update `ps_specific_price` set price = (((price * 1.19) * 100) / 116.0);

SQL update for graduated prices to 5% VAT:

update `ps_specific_price` set price = (((price * 1.7) * 100) / 105.0);

Important note: backups!

Typos or the like occur very quickly!

Always work with a backup and, if possible, first in a test shop. In this way, any errors can be avoided in advance.

We wish you much success!