Price display problem / tax rules


Our website is running under prestashop 1.6

We encounter a problem since the implementation of the law requiring to apply the VAT of the country of delivery. Indeed, we went from a system where everyone paid the same price to a system where the price depends on the delivery address. For the moment, we do not use a geolocation solution.

Until now, we used a single cache, whether users were logged in or not, using ESI blocks and excluding the whole checkout process. In "Context Vary Bypass" we specified "curr, lang,ctry", with the views being the same for all. This worked well even though we had a huge number of inodes which started to cause problems.

We are now trying to adapt the configuration, but without finding the right combination:
- We removed the "ctry" parameter from "Context Vary Bypass" ;
- We have activated the separate display for visitors and logged in.

Our problem is that for connected users, the price displayed will be the one of the selected shipping country of the first connected person who visits the product/category page.

I was thinking of creating ESI blocks for the prices, but I don't know if this is ok and I'm afraid it will multiply the number of inodes leading to server saturation.

Do you have an idea for a solution? Could a geolocation solution solve this problem, if so which one?

Thanks in advance,



Staff member
it may depend on the how the VAT module is implemented. Checkout process won't be cached. If the VAT module works during the checkout, it should apply the right price. price of the front end will show one based price. if you want to the front end (instead of just checkout stage) to show right price with right VAT added, you may need to use geoip and vary county from the beginning.
Hello, we are facing the same issue.
Have you found a solution?
Ideally the price section is not cached alternatively it would be a geo-based solution but I think that will prove to be much harder.


Well-Known Member
Netherland? European Union? Why are you making it so complicated? As European seller who sells to private customers you must not offer different tax rate depending on where a EU customer come from. It is quite simple. For EU customers use tax rate from your country. For Switzerland and non EU customers tax is free.


Well-Known Member
I just investigated your shop. You can't use different tax and currency with LScache, because PrestaShop stores these information in session and with LScache there is no more session if the cache plugin is not extended. It is possible, but cache plugin has no function to make the usage of different tax rates and currencies possible.


Well-Known Member
I am going to investigate the possibility to exclude the pricing block from being cached using an ESI
No good idea! ESI is a solution, but it is not the bringer of salvation. Depending on application and PHP framework ESI reduces performance up to 100 percent, really! My advice for you: Use a general gross price for all private customers indepently where they come from, because as long a customer has not registered you can't qualify from which country he is coming. Identify by IP with GEO database is unsafe and can easily be faked. If you still want to offer a selection for currency and country you must use cookies, because you don't have a session, where these information can be stored, if a page is cached. Depending on selection write different cookie values and these cookies you can use for cache varies. Big Advantage: No loss of performance because of ESI-less use. Disadvantage: Either PrestaShop or cache plugin must be extended to write the result of selection in a cookie.