News:

Looking for documentation? Take a look on our wiki

Main Menu

Complete List of States / Provinces / Regions

Started by bryanearl, May 15, 2018, 23:31:12 PM

Previous topic - Next topic

bryanearl

#15
Quote from: Studio 42 on May 19, 2018, 23:44:37 PM
I checked the file.
You should not add a state_3_code, state_2_code
For eg in france 67 = bas-rhin for postal code
And in your database Bas-Rhin','68','68'
So the code can have right values in some case, but not in other cases.
An empty value is better then a generic one.
Here you can see the ZIP codes per states in france https://fr.wikipedia.org/wiki/Num%C3%A9rotation_des_d%C3%A9partements_fran%C3%A7ais, so you understand the problem.

Well, that would make it much easier! However, I assumed that the 3-code and 2-code were required fields because when entering in a state manually in VM backend, those fields are required.

bryanearl

Quote from: jjk on May 19, 2018, 23:20:08 PM
Just a note - for worldwide shipping the 'state/province/region' is useful only if those location names are required in the postal address. In many countries this is not the case.

Yes, I know. However for my case, the business I am building the site for had all states in their previous webstore and wanted to keep it that way.

schiffsratte

For France the best resources I have found are those:

The most complete is maybe the INSEE site
https://www.insee.fr/fr/information/4316069

But those two are good also
https://github.com/Stanislas-Poisson/French-zip-code
and
https://sql.sh/1879-base-donnees-departements-francais

even the streets are available (thanks to fiberglass deploiement, I guess  ;) )
https://sql.sh/2716-base-donnnees-rues-france

But I used other files for eg Odoo from geonames.org.
They have postcode/city files for many (but not all) countries:
https://download.geonames.org/export/zip/