I have installed the OpenStream geoIp extension that pulls data from MaxMind database and I have been using this code for years to hide prices in countries that are not allowed:

            $geoIP = Mage::getSingleton('geoip/country');
                    if ($geoIP->isCountryAllowed()) {

Now this is no longer working. Allowed countries are only UK, US and Canada. I want to hide prices for all other countries, but if I echo the country code, it shows US. I am using a VPN to test. Also if I try to update the GeoIP db I get banned for hours. Has anything changed? ANy pointer is very welcome.

  • which API you used to get groip data? – Dhiren Vasoya May 2 '19 at 10:16
  • Sorry I should have been more specific. I am using Openstream extension that pulls data from the Maxmind database. – Shakamal May 2 '19 at 10:25
  • Share the code to get information from that database that you do. – Dhiren Vasoya May 2 '19 at 10:27
  • I will have to copy the whole extension. The project code is available on github link – Shakamal May 2 '19 at 10:44
  • Can you tell me, does are you not able to get data from magento configruation? or from Maxmind database? And where above code you write? give me file path. – Dhiren Vasoya May 2 '19 at 10:51

I also installed this plugin many years ago on my Magento V1 store and just recently I got complaints that certain content I had been hiding from other countries was now being viewed. I'm not sure what happened it just stopped working. Did you find the issue on your end?

| improve this answer | |

MaxMind GeoIP Lite has been discontinued (https://support.maxmind.com/geolite-legacy-discontinuation-notice/) so it is no longer possible to synchronise the DB and, as a consequence, some IPs are not detected correctly.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.