Jump to content

Geopip automatic currency updator


Recommended Posts

Hi ,

  Recently I bought this module called  http://www.modulebazaar.com/en/prestashop-geoip-module.html  The GEO IP Switcher . I have installed the module in my local, downloaded both the inc and dat file in the modules location. And have inserted a piece of this code 

 

<?php
require_once('geoip.inc');

$gi = geoip_open('GeoIP.dat', GEOIP_MEMORY_CACHE);
$country = geoip_country_code_by_addr($gi, $_SERVER['REMOTE_ADDR']);
geoip_close($gi);

$my_countries = array('us', 'ca', 'gb', 'fr', 'de', 'nl');
if (!in_array(strtolower($country), $my_countries))
{
header('Location: http://www."ALL"TRAFFICURLGOESHERE.whatever');
}
else
{
header('Location: http://www."SELECTEDCOUNTRIES"URLGOESHERE.whatever');
}
?>

 

 

in my ip.php file in the same location. enabled preferences->geo  location in backend too. 

 

I want someone to guide what is that I have to follow to check if my module is working fine with different ip. And is there any html code i need to insert ot see inthe frontend.  I am a newbie need a step by step guidance. 

Link to comment
Share on other sites

I am om PS 1.6 . I have installed the module in my server but I dont know how to make it update the currency in according to ip. Suppose for India it should show in rupees, rest all other countries in dollars. I have both the currency in my BO and now the problem is soon as i installed this module my frontend isnt working its only a blank screen. It could be the memory size I suppose. 

 

But the major thing is I want to test this with different IP's for demo.  Which developers of website or module builders ? 

Edited by sophia@wolabi (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...