Tips on How to Import a List of States for Any Country in Your nopCommerce Site

Tips on How to Import a List of States for Any Country in Your nopCommerce Site

As per the traditional method, developers have to import a list of states for any country on their nopCommerce site by adding the details one at a time. This is a hectic procedure where a developer requires spending hours on configuring his site for listing the states. Being a developer, if you want to import a list of states but don't want to follow the traditional procedure, there is an alternative way. 
 
Seeing the inconvenience of developers in creating the list manually, the nopCommerce management team has come up with a modern method where you can create a list of a few minutes. In this tutorial, we will discuss the steps to import a list of states from any country on your nopCommerce site.

If you still do not know how to install nopCommerce, you can follow the tutorials we worked before, including install nopCommerce using WebSitePanel and create a nopCommerce store using WebMatrix

Steps to Import a List of States for Any Country

In the nopCommerce 3.50, the recently launched version, you get an option to add the list of states by importing the list conveniently and  import the list of states for one or more country to your site by following the authorized procedure. 
 
In other words, if you run business through your website in more than one country, you can add the list of states with the target geographical areas by importing the list on your administrator bar. That being said, let's move on to the steps of importing the list.
 
To start with, you should log into your admin panel by inserting the administrator login information. In the panel, you have to dig into the Administrator section and click on the Configuration option. Here, you will find many options, such as Stores, Countries, Languages, Currencies, Measures, Email Accounts and Payments. As you need to configure the list of states, you must choose the Countries option from the available list. 
Import a List of States for Any Country in  nopCommerce Site 1
In the Countries section, you can only import a .CSV file that contains the list of states. As your nopCommerce site comes with a preloaded list of states, you can export the list to add more states. The list can be modified after you download it on your desktop by clicking on the "Export states to CSV" option in the Countries section. 
Import a List of States for Any Country in nopCommerce Site 2
However, if you do not want to modify the preloaded list, you will have to create a custom template. It should be noted that the template file must be saved in the .CSV format. 
 
After you create the basic format of the template, you will have to configure the list by putting in the technical details of the states. This involves the country code and the name of the states. For instance, if you want to insert states of the USA, like Alaska, Florida and Arizona, you should enter the names of US Alaska, US Florida and US Arizona respectively.
 
Apart from this, there are several other columns where you need to insert "True" and "1". Once you are done with the formation of the list, it is imperative to verify the inserted details. To be accurate, you must make sure that the states name and country codes are inserted correctly. Spelling errors or mistakes in combination can cause problems to your nopCommerce site.
 
Upon the completion of the list in the .CSV format, it's time to upload the file to your website. This can be done in the administrator section of your site. All you need to do is, navigate to the Countries tab and select the "Import states from CSV" option for choosing the file. 
Import a List of States for Any Country in nopCommerce Site 3
When the file is imported to the website successfully, you will notice that the states have been categorized under the list of countries where they are located. This marks the end of the procedure, and you can sell your products in the respective states and countries efficiently. 
Import a List of States for Any Country in nopCommerce Site 4
Related Articles