The main table where all the state values of a country are stored is directory_country_region and directory_country_region_name.
The fields of the table ‘directory_country_region’ are
1. region_id: auto-incremented id
2. country_id: the iso code of country (this code is taken from directory_country table)
3. code: unique code to be used for a state
4. default_name: name of the state
The second table is directory_country_region_name with fields
1. locale: website locale or language of the website
2. region_id: it’s a forign key from the previous table
3. name: name of the state for a specific language or locale.
The first table is required to add states to a country, the second table is only required if you want state to be displayed in multiple languages.
So to add state to country Australia, we need to insert a row in the table directory_country_region.
insert into SCHEMA_NAME.directory_country_region (country_id,code,default_name) values ('AU','AU-NSW','New South Wales'); |
Let me know if you find any questions related to above tutorial.
I have found an another solution at http://webdesignsolutions.co.in/add-country-and-state-dropdown-in-magento , it helps me a lot.
ReplyDeleteMy product is Magento Checkout cart
ReplyDeleteI had a issue during bug clearance of my client.
When the product page is opened, ajax request is fired.
What I have to do to resolve this problem?
Thanks for your ideas. You can also find the details on Affity Solutions, at the Magento Website. The main object of the Affity Solutions is to provide quality web services and is among the few software development company in Australia.
ReplyDelete