How to import a list of states for any country in nopCommerce

Previously, if a store owner / admin had to add a list of states for any country where they would like to sell their products / services, the only way to accomplish that was adding each state one by one.

Yes, the process have always been quite tedious and time consuming as there was no other way to add number of states in nopCommerce out of the box.

nopCommerce 3.50 is just released and a feature has been added in the administration section which allows store owners to import a list of states for any country.

Today, we will be going over the process of importing number of states for one or more countries.

Go to: Administrator > Configuration > Countries

Import list of states in nopCommerce for countries

Now you need a prepare a template for import. A simple way to do this is by geiting a sample file by exporting existing states (click "Export states to CSV" button) and save the file as .CSV.

Once you have the  template, you will setup your import list by adding country code, states for the country code.

For example: If US is the country then you will add states like this -

US Alaska
US Arizona
US Hawaii
US Florida

You have other columns to in which you will specify True & "1".

After you complete your list, you are ready to import. Simply click on the button "Import states from CSV"

Import list of states in nopCommerce

After a successful import, your states should be in the list of countries respectively.

Import list of states in nopCommerce


Hope it help...

About Author

Written By Lavish Kumar

Based out of New York, USA, Lavish Kumar is a full stack web developer by profession and founder of Striving Programmers, a trusted community for developers that offers a wealth of articles and forums to assist individuals with improving their software development skills.

Leave your comment