From the design standpoint, drop-down is an excellent feature which helps creating cleaner layout and automatically validates the input. While working with Magento 1 or Magento 2, the best example is country and state drop down lists.
Talking about Australia, majority of the older Magento 1 and Magento 2 versions don’t include states drop down list for it. Magento developers need to deal with creating a list of states while adding forms or in the backend configuration. So here, I’ve come up with the SQL script to import Australian states in Magento here!
You may use the SQL script while creating shipping rules, setting a default state for a country, allowing customers to select shipping state in Australia while placing orders, etc. Anything related to Australian states in Magento development and the script is ready for you ?
SQL Script to Import Australian States in Magento:
INSERT INTO `directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'AU', 'NSW', 'New South Wales'), (NULL, 'AU', 'QLD', 'Queensland'), (NULL, 'AU', 'VIC', 'Victoria'), (NULL, 'AU', 'WA', 'Western Australia'), (NULL, 'AU', 'TAS', 'Tasmania'), (NULL, 'AU', 'SA', 'South Australia'), (NULL, 'AU', 'NT', 'Northern Territory'), (NULL, 'AU', 'ACT', 'Australian Capital Territory') ; INSERT INTO directory_country_region_name( locale, region_id, name ) SELECT 'en_US' AS "language", region_id, default_name FROM `directory_country_region` WHERE country_id = 'AU'
You may use the above SQL script anywhere to import Australian states in Magento 1 or Magento 2 store development ?
Thank you