Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod General Support
- » Metamod not working on state basis
Metamod not working on state basis
Metamod not working on state basis
Hi,
I am using metamod to vary between countries, which is no doubt working fine. However i tried for a particular state in india, it is not working.
It works for countries and not for states, here is my sample code. Let me know where i am going wrong.
if ( $fromCountryId == "AE" || ($fromCountryId == "IN" && $geoip->region == 13)) return 101; else
return 118;
Please let me know as soon as possible
Sandeep
Re: Metamod not working on state basis
Hi Sandeep,
I just did a couple of tests.
1 - looked up the Indian Govenment web site, got the IP address, then put that into the demo box on maxmind.com to see if that showed a region. It does NOT.
2 - looked at the CSV file that shows all the possible FIPS codes that the maxmind database can contain:
http://dev.maxmind.com/static/maxmind-region-codes.csv
In that, there are definitely some codes for Indian regions, so I guess that some IP addresses will resolve to a region. But it appears that success is random.
3 - tested a couple of other IP addresses of web sites in India. So far I haven't come across one that has a region code.
So I think the answer is that the maxmind databases are not reliable in India for region codes. You might be better off checking for particular cities, as all the examples I tried did have cities associated with the record.
Sorry - this functionality depends entirely on the reliability of the underying databases.
Best regards,
Stephen
- Index
- » MetaMod
- » MetaMod General Support
- » Metamod not working on state basis
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5942
- Total Posts Today:
- 1
- User Info:
- Total Users:
- 7624
- Newest User:
- borger3298
- Members Online:
- 1
- Guests Online:
- 176
- Online:
- borger3298
Forum Legend:
Topic
New
Locked
Sticky
Active
New/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky/Active/Locked