Country settings

Ubercart uses a simple interface for importing and updating information for international country support. Browsing to the country settings page will show you a list of countries currently installed (U.S. and Canada by default) along with a select box that lets you import additional countries. Below that are fieldsets with country specific settings, specifically at the moment the country's address format. Read on to learn how to get additional country support for your installation.

Imported countries
The table in this section lists the countries you have installed, their current versions, and a set of operations for each one. From this list you can disable/enable, update, and remove countries you have installed. A disabled country can simply no longer be selected on address forms whereas a removed country is totally wiped from the database. In the case of a store that has been accepting orders from other countries and no longer wishes to support them, it is recommended that you simple disable the country instead of removing it. Addresses for countries that are removed will no longer display properly if the country is removed, even if it is later imported again.

To import a new country or update to a new version of a country file, you must place the most recent file in the Ubercart directory ubercart/uc_store/countries on your server. The latest version of the file will always be used for importing and updating. To install a new country, simply select it with the select box and click the Import button!

Country specific settings
The first collapsed box is the key for writing address formats. When a country is imported, its default address format is set. However, if you need to change the way it displays you may do so using the instructions for address formats and the country's settings menu. Simply click the name of the country you want to modify and put in the address format you want to use. Instead of typing out an actual address, use the following variables to represent the different components of an address.

Variable
Description

!first_name
Customer's first name

!last_name
Customer's last name

!company
Company name

!street1
First street address field

!street2
Second street address field

!city
City name

!zone_name
Full name of the zone

!zone_code
Abbreviation of the zone

!postal_code
Postal code

!country_name
Name of the country

!country_code2
2 digit country abbreviation

!country_code3
3 digit country abbreviation

!country_name_if
name of the country, if different from store country

!country_code2_if
2 digit country abbreviation, if different from store country

!country_code3_if
3 digit country abbreviation, if different from store country

The following example is the default address format for addresses in the U.S.
!company<br />!first_name !last_name<br />!street1<br />!street2<br />!city, !zone_code !postal_code<br />!country_name_if