Sophia(sofi) Posted June 9, 2015 Share Posted June 9, 2015 I recently bought this module PrestaShop Currency Auto Switcher + GeoIP Location and have done all settings. such as have downloaded the .dat and .inc file in the modules location. Installed the module. Enabled geolocation in preferences from my backend. I have also inserted a piece of code in my ip.php file <?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', 'in', 'uk', 'ca', 'fr', 'dk'); if (!in_array(strtolower($country), $my_countries)) { header('Location: http://www."ALL"theethnicstory.com'); } else { header('Location: http://www."SELECTEDCOUNTRIES"theethnicstory.com'); } ?> I am now stuck , I want to check the working how would I do that ? or do I have to insert any piece of code in the tpl files to see in the Frontend please help asap. I have my web launch by tomorrow. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now