Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibility to switch country for anonymous visitors to calculate locale taxes #42

Open
Zielgestalt opened this issue Jul 27, 2023 · 0 comments

Comments

@Zielgestalt
Copy link

I have a shop where the vat is calculated based on the shipping address of the user. So when I have a logged in user and he has a default address in a country different than the default country in the default tax zone, I can use the set address endpoint and this user gets updated gross prices and taxes for products back. That's great.

But this is a bit annoying for anonymous users that they only see their 'real' prices at checkout. It would be great if there is a possibility that a anonymous website visitor can select one of the available countries in the frontend and after that he gets the updated taxes and gross prices for the tax zone of his country. This might also be interesting e.g. for geolocating customers.

Is there any possibility to make this possible? I know how to create a custom rest route with your pro module. But I don't know how to set countries/tax zones in Prestashop. I was thinking about creating 'default addresses' for all countries and let the user set them, but that's not very pretty and leads to problems when there are different address IDs for local and production environments. Maybe it could be a plan B or so.

Any thoughts or maybe hints to guide me in the right direction? Thanks!

@Zielgestalt Zielgestalt changed the title Possibility to switch tax zones for anonymous visitors Possibility to switch country for anonymous visitors to calculate locale taxes Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant