Introduction
Configio's Countries and States feature gives you control over functionality that is related to addresses and locations. You can control which countries appear in your application, and you can control how they appear. You can also control which countries require a state to be selected when creating an address or location, and you can control which countries trigger account holders to opt in-or-out of email marketing.
Note: Every country and state is already pre-seeded in your database. By default the United States and Canada, including all of their respective states and provinces are active. You can easily activate more countries and add new ones if necessary.
Getting Started
While there are no system configurations that directly affect the Countries and States feature, per se, this is a good opportunity to note that there are configurations around countries and states. Login to the administrative side of your database, and navigate to Settings --> Setup --> Configuration. Search for "Country".
Of note, you will see a System configuration for "Default Country". It should be seeded as "US", which is the Country Code for the United States. This controls which country is listed first when adding a location or address. If you would like something else, input it's Country Code. You can find the Country Code in the Countries and States table, Settings --> Setup --> Countries and States. Be sure to enter the Country Code, not some other value like the Title.
Viewing the Countries and States Table
Login to the administrative side of your database, and navigate to Settings --> Setup --> Countries and States. You will see a list of all countries that are available in your database. You can search, sort, and browse the list of countries. On each country, you can see it's Title, Code, Export Value, and various statuses. The statuses (with a brief description) are:
- Inactive: if checked, it will not be listed anywhere
- Show In Admin: if checked, it can be used to create an address or location in the Administrative side of your database
- Show In Shopping Cart: if checked, it can be used to create an address in the Shopping Cart side of your database
- Require Email Opt-in: if checked, when a customer is creating their account address, they will be asked to opt-in or out of marketing emails. This setting is on the Edit Account screen in the Admin, and so it can be changed by your Admins.
- Require State: if checked, when creating an address or location, State will be a required field
Editing Countries
Click the Edit Icon on a country. You can change any of the values values. Click the Update button when done editing, or click the Cancel button to back-out your changes.
Adding a Country
Click the Add New Country button. There will be a new table row. Input values, make settings, and click the Update button to save your country (or click the Cancel button and then the Delete button).
Editing States
Click on a country's Manage States button to see a list it's states. You can search, sort, and browse the list of states. On each state, you can see it's Title, Code, Export Value, and Sort ORder. and various statuses. The statuses are:
- Inactive: if checked, it will not be listed anywhere
- Show In Admin: if checked, it can be used to create an address or location in the Administrative side of your database
- Show In Shopping Cart: if checked, it can be used to create an address in the Shopping Cart side of your database
Adding a State
Click the Add New Country button. There will be a new table row. Input values, make settings, and click the Update button to save your state (or click the Cancel button and then the Delete button).
Deleting All States
To delete all of a country's state, click the "Delete All States" button, and then the OK button on the confirmation modal (or click the Cancel button to retain the states).