I'm trying to implement a JavaScript solution in Shopify to match my customer's current location (by country.code using http://freegeoip.net/json) against an array of countries that my shop delievers too.
What I need to complete this is a list of country codes for all the countries in my 'Regions and Taxes' tab in JSON format that I can then use in my JavaScript file.
Just to (potentially) make it slightly trickier, we are going to have FIVE different shops each with different regions against each shop but all using the SAME set of templates uploaded from a single source control. So any code I write needs to be universal on all stores (i.e fetch the relevant JSON object to that shop). I can then either show people a country selector or not, depending if they are on the correct site
Is this possible Shopify / JavaScript gurus?
Thanks :-)