-1

I have a website that is hosted with Adobe Business Catalyst. I have the following liquid code that checks for country location and redirects the user accordingly:

<script> window.location = 
    {% if globals.visitor.country == 'AU' %}
    "/au"
    {% elsif globals.visitor.country == 'US' %}
        "/us"
    {% elsif globals.visitor.country == 'GB' %}
        "/gb"
    {% else %}
        "/store-unavailable"
     {% endif %}
</script> 

I am located in Australia, so I can only check the country location for Australia. How would I test the script for the other countries?

Thanks

2 Answers2

0

It really depends on how liquid gets the information about the visitor. Probably it takes the language from the user-agent information send by the browser. If this is the case, you can simply change the language in your browser settings (for Firefox: Edit - Settings - Content - Language).

If it is not the case, it probably looks up the IP. Then you would have to appear with another IP (by using a proxy - if you use TOR you can see what country that IP is from).

Max
  • 66
  • 1
  • 9
0

You should use a proxy server to trick the browser that you are coming from a different country.

You can also google "test website from different country" and you will find many solutions.

Daut
  • 2,537
  • 1
  • 19
  • 32