The Foxy forums are on the move!

We're in the process of moving our forums over to a new system, and so these forums are now read-only.
If you have a question about your store in the meantime, please don't hesitate to reach out to us via email.

Automatic country detection, how to override?

hhk225hhk225 Member
in Help edited September 2014
I notice the shopping cart automatically detects my country. I assume it's by IP address.

How can I override this so I can test the cart as a customer from another country? I already tried TunnelBear to spoof my IP but it doesn't seem to work or is inconsistent.

Any advice on multi-country testing is appreciated.
  • There's a 'configuration' link in your admin, below the 'Templates' section at the top of the page, from which you can turn it off.
  • fc_adamfc_adam FoxyCart Team

    You're right that the country is auto-detected by GEOIP, and we don't currently have a built in way to override that. You could alter the twig templates to make them default to a different country, but that's probably a more involved approach than required for just testing as different countries.

    One way you could fake it is to set the shipping address country on page load to a different country. For example, if you add this as the first line of the "cart include" template, that will fake the country as the United Kingdom:
    <script> = "GB";</script>
  • Thanks @UP but that setting doesn't seem to have any effect on the country auto-detect.

    @fc_adam, I will give that a shot.
Sign In or Register to comment.