Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

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

sandeepar
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Re: Metamod not working on state basis

Please anyone help me with this, i am struck with this issue. Let me know whether its possible OR not regarding the state wise codes.

sandeepar
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

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

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3328 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1679
Total Polls:
6
Total Posts:
5933
Posts this week:
3
User Info:
 
Total Users:
4397
Newest User:
tull687318
Members Online:
0
Guests Online:
219

Online: 
There are no members online

Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked