VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: readyforchange on May 31, 2012, 21:19:34 PM

Title: Thailand - State (2) Codes - State (3) Codes & Regions
Post by: readyforchange on May 31, 2012, 21:19:34 PM
Hello Everyone,

I am inputting the states of Thailand into Virtuemart and I notice I need both State (2) and State(3) codes.  However I cannot find information on state (3) codes for Thailand.  Is there a way for me to disable this ?  As well, How do I edit the regions for just Thailand?

---
Province   HASC   ISO   FIPS   Reg
Amnat Charoen   TH.AC   37   TH77   NE
Ang Thong   TH.AT   15   TH35   C
Bangkok Metropolis   TH.BM   10   TH40   C
Bueng Kan   TH.BK      TH81   NE
Buri Ram   TH.BR   31   TH28   NE
---

How does this work in general?

Thank you.
Title: Re: Thailand - State (2) Codes - State (3) Codes & Regions
Post by: Bigfish on July 10, 2012, 17:19:58 PM
I know its an old post but did You manage to get it right.
I am setting up VM but we also dont have 3 letter codes .
I am using 2 letters in both fields & VM seems to accept it
Title: Re: Thailand - State (2) Codes - State (3) Codes & Regions
Post by: Bigfish on July 10, 2012, 17:58:09 PM
I tried to google 3 leter code & somehow got something about 3 letter United Nations Code for Trade and Transport Locations (UN/LOCODE)

Amnat Charoen   CAN
Ang Thong   ATH
etc etc

Check http://www.unece.org/fileadmin/DAM/cefact/locode/th.htm (http://www.unece.org/fileadmin/DAM/cefact/locode/th.htm) for the rest
Title: Re: Thailand - State (2) Codes - State (3) Codes & Regions
Post by: readyforchange on July 29, 2012, 13:58:42 PM
Bigfish,

Thanks for the response.   The headers are switched around for 2 and 3 state codes.  I ended up using iso codes and adding an extra 0 in the front of them.

http://www.statoids.com/uth.html

Province   HASC   ISO   FIPS   Reg   Population   Area(km.²)   Area(mi.²)
Amnat Charoen   TH.AC   37   TH77   NE   356,556   3,161   1,221
Ang Thong   TH.AT   15   TH35   C   269,419   968   374
Bangkok Metropolis   TH.BM   10   TH40   C   6,355,144   1,569   

ie amnat charoen i used.. 037 for the 3 code.  and for the two code i used AC. 

it was just a bandaid solution at the moment but it worked.  Now that you showed me this other list I can use those I guess. 

I am not sure what difference it really makes as there are no real plugins that utilize this information at the moment to my knowledge.  It might be different for you though.