Post by napster2727 » Thu Jan 25, 2018 6:40 pm

Hi There,
So The issue i have is that i want to show some message in header depending on country or geo zone
So how can i write if statement ?
if (geo_zone_id == 4) show the banner

Newbie

Posts

Joined
Wed Jul 05, 2017 4:32 am

Post by simonpieman » Fri Jan 26, 2018 2:10 am

How do you intend to which country the visitor is from county : their login / currency /IP / browser language etc. Depending on that answer leads to the code.

Go the All Blacks!


Active Member

Posts

Joined
Thu Jul 02, 2015 8:58 am
Location - NZ - Auckland

Post by napster2727 » Fri Jan 26, 2018 7:36 am

Maybe IP,
How for example weight baset shipping gets geo zones? For example if i'm from spain shipping cost will be calculated for spain and so on.
So i thought that the same would work here
i found a code for weight base shipping and it is getting geo_zone_id
if geo_zone_id will be one of the countries from the zone list will it work?
if so how is it possible to get geo_zone_id as int
or is there any other way
thanks

Newbie

Posts

Joined
Wed Jul 05, 2017 4:32 am

Post by paulfeakins » Fri Jan 26, 2018 6:24 pm


For quick, professional OpenCart support please email info@antropy.co.uk


User avatar
Guru Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - Reigate, Surrey, United Kingdom

Post by Johnathan » Sat Jan 27, 2018 4:08 am

Not sure if you're looking for a commercial solution, but you can do this with a combination of Geo IP Tools and Rule-Based Banners. You'd use Geo IP Tools to detect the customer location, and then add a banner with a rule like this, so it only appears for users in that geo zone:

Rule: Geo Zone is Spain

Feel free to take a look at the screenshots and demo site, and if you're interested let me know at www.getclearthinking.com/contact if you have any further questions.

Image
Image Image Image Image


User avatar
Global Moderator

Posts

Joined
Fri Dec 18, 2009 3:08 am

Who is online

Users browsing this forum: No registered users and 33 guests