ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Different content based on County / IP Location

January 13, 2012 4:32am

Subscribe [1]
  • #1 / Jan 13, 2012 4:32am

    daverayner

    4 posts

    Hi All,

    My client has two third party online stores they want to link to from their EE site.
    These stores have multiple country versions (and therefore URLs).

    eg:

    http://www.zazzle.com/clientstuff
    http://www.zazzle.co.uk/clientstuff
    http://www.zazzle.com.au/clientstuff

    It would be ideal to just send the user to the most relevant URL based on their location (with a US fallback).

    I have tried Country Variables and Country Plugin but neither actually work (I would be happy if they did though!)

    So to clarify:

    On my one link i want to do this sort of thing:

    {if users_location == "AU"}
      http://www.zazzle.com.au/clientstuff
    {if:elseif users_location == "UK"}
      http://www.zazzle.co.uk/clientstuff
    {if:else}
      http://www.zazzle.com/clientstuff
    {/if}

    Can this be done?

  • #2 / Jan 14, 2012 3:32pm

    Dan Decker

    7338 posts

    Hi daverayner,

    Welcome to the Support Forums!

    The Country Variables add-on is for ExpressionEngine 1.x only, you have posted to the EE 2 forum, so I’m gonna guess that’s what you are using. The County Plugin should work fine with EE 2, but it does note that the IP2Nation module has to be installed in order to function. Do you have that module installed? It is part of ExpressionEngine, but is not installed by default. You can check to see if it installed by going to Add-ons-> Modules and looking in the list. If the IP2Nation module has been installed, it will note that in green text.

    Cheers!

  • #3 / Jan 14, 2012 6:13pm

    daverayner

    4 posts

    Hi Dan,

    You’re right - EE2.
    I do have IP2Nation installed too… actually I did not know what to do with the Country Plugin file “pi.om_country_detector.php”? The support page / developer throws a 404.

    I’m used to adding a folder to ‘third party’.

    If that plugin can work - then happy days!

  • #4 / Jan 15, 2012 6:58pm

    daverayner

    4 posts

    Hi All,

    Country Plugin still gives no love (installed, but breaks)
    “Fatal error: Call to a member function fetch_param() on a non-object in /nfs/c01/h13/mnt/11393/domains/smilingbear.com.au/html/systembear/expressionengine/third_party/om_country_detector/pi.om_country_detector.php on line 38”

    Anyone got this plugin working?

  • #5 / Jan 17, 2012 1:31am

    daverayner

    4 posts

    I now have it on authority that Country Plugin is for EE1 only, not EE2 (from Mike Bridgeman)
    http://www.mikebman.com/2010/10/expressionengine-country-plugin/#comment-2332

    So can any one solve this pseudo code of mine:

    {if users_location == “AU”}
      http://www.zazzle.com.au/clientstuff
    {if:elseif users_location == “UK”}
      http://www.zazzle.co.uk/clientstuff
    {if:else}
      http://www.zazzle.com/clientstuff
    {/if}

  • #6 / Jan 20, 2012 4:38pm

    Dan Decker

    7338 posts

    Hello daverayner,

    First, I apologize for the delay in response to you!

    I did some more digging on devot:ee and found this:ipGeo From the description, it looks like it can provide what you are looking for.

    Let us know how you get on.

    Thanks!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases