Shopify GeoIP

  • Started
  • Last post
  • 2 Responses
  • Nairn

    Has anyone here any experience in limiting functionality within Shopify, based on region?

    eg, the displaying of content within liquid files, rather than products or collections at the administration level?

    I have what basically amounts to a div that I would like to only be displayed in one region - it's essentially a payment option that is only available locally. I'm not worried about people on VPNs etc circumventing it as if they're not in the right region, they can't use it anyway.

    Thankd for any insight anyone can share (although having spent a couple of hours on this, I'm not hopeful what I require can actually be done).

  • Nairn0

    . o O ( Why does it always happen that as soon as I post an enquiry, an idea pops into mind?? )

    I wonder if I could iFrame the content, with a link to my server, where I can do the GeoLocation and either display what I need, or just return nothing?

    but then, I suppose the engagement would happen off shopify and the thing I want to embed wouldn't engage with the liquid file.

    hmm. that won't work, will it?

  • sted0

    izi pizi
    check for the location variable in the session data or…

    push the location into a js variable, hide the content what doesn't fits the visitors location.

    if (location.country_code != 'US') {