Address formats - what are they?

How addresses are displayed in different countries

You may have noticed the address format value ranges between 1 and 20. The UK is 6, USA is 7 and most other countries are 5. There is a full list below. The Default format is 1 which is no longer used by any country.

What exactly is the ‘format’ ?

Address formats are based on international ISO standard formats.

In Zen Cart, formats are stored in the address_format table.

This table is structured as follows:

Columns

address_format_id

A unique, auto incremented value, to identify each address format record.
Type: int(11)
Null: No
Default:
Extra: auto_increment

address_format

The format used for displaying the shipping/billing address.
Type: varchar(128)
Null: No
Default:

Possible variables are:

  • $firstname - first name
  • $lastname - last name
  • $cr - forces line break
  • $streets - street address
  • $city - city
  • $state - state
  • $statecomma - state followed by a comma and a space
  • $postcode - postcode
  • $country - country
  • Punctuation, spaces and other characters can be added as well before or after the variables

address_summary

Summary of the address format used for display purposes.
Type: varchar(48)
Null: No
Default:

Default Entries

The default entries can be seen in the file zc_install/sql/install/mysql_zencart.sql.

Zen Cart 1.5.6

The entries are:

IDValue
1 $firstname $lastname
$streets
$city, $postcode
$statecomma$country,$city / $country
2 $firstname $lastname
$streets
$city, $state $postcode
$country,$city, $state / $country
3 $firstname $lastname
$streets
$city
$postcode - $statecomma$country,$state / $country
4 $firstname $lastname
$streets
$city ($postcode)
$country, $postcode / $country
5 $firstname $lastname
$streets
$postcode $city
$country,$city / $country
6 $firstname $lastname
$streets
$city
$state
$postcode
$country,$postcode / $country
7 $firstname $lastname
$streets
$city $state $postcode
$country,$city $state / $country

The values are used as follows:

1 - Default, most countries except those below. 
2 - USA 
3 - Spain 
4 - Singapore 
5 - Germany 
6 - UK/GB 
7 - Australia

Zen Cart 1.5.8

Additional address formats have been added to Zen Cart 1.5.8. If you upgrade from a previous version of Zen Cart then any address codes you have created will be moved outside of the new default range and all orders and country entries that used them will be adjusted.

Below is a table with the Format ID, Address formats, an example of the address and the countries to which they are applied.

Format Address Format Example                                                             Countries
1 $firstname $lastname$cr$streets$cr$city, $postcode$cr$statecomma$country firstname surname
street address
addressline2
city, postcode
state, country
Default - Not Used
2 $firstname $lastname$cr$streets$cr$city, $state $postcode$cr$country firstname surname
street address
addressline2
city, state postcode
country
Latvia
Myanmar
Saint Kitts and Nevis
Somalia
Trinidad and Tobago
3 $firstname $lastname$cr$streets$cr$city$cr $postcode - $statecomma$country firstname surname
street address
addressline2
city
postcode - state, country
Not Used
4 $firstname $lastname$cr$streets$cr$city ($postcode)$cr$country firstname surname
street address
addressline2
city (postcode)
country
Not Used
5 $firstname $lastname$cr$streets$cr $postcode $city$cr$country firstname surname
street address
addressline2
postcode city
country
Åland Islands
Albania
Algeria
Andorra
Argentina
Armenia
Austria
Azerbaijan
Belgium
Bosnia and Herzegowina
Bulgaria
Cape Verde
Chile
Croatia
Cyprus
Czech Republic
Denmark
Dominican Republic
Equatorial Guinea
Estonia
Ethiopia
Faroe Islands
Finland
France
French Guiana
French Polynesia
French Southern Territories
Gabon
Georgia
Germany
Greece
Greenland
Guadeloupe
Guinea
Guinea-bissau
Haiti
Iceland
Israel
Jamaica
Kuwait
Lao People’s Democratic Republic
Liechtenstein
Lithuania
Luxembourg
Macedonia, The Former Yugoslav Republic of
Madagascar
Martinique
Mayotte
Moldova
Monaco
Morocco
Netherlands
New Caledonia
Niger
Norway
Paraguay
Poland
Portugal
Réunion
Romania
San Marino
Senegal
Slovakia (Slovak Republic)
Slovenia
St. Pierre and Miquelon
Svalbard and Jan Mayen Islands
Sweden
Switzerland
Syrian Arab Republic
Tajikistan
Turkmenistan
Uruguay
Wallis and Futuna Islands
Palestine, State of
Montenegro
South Sudan
6 $firstname $lastname$cr$streets$cr $city$cr$state$cr$postcode$cr$country firstname surname
street address
addressline2
city
state
postcode
country
Afghanistan
British Indian Ocean Territory
Egypt
Falkland Islands (Malvinas)
Gibraltar
India
Iran (Islamic Republic of)
Ireland
Kazakhstan
Kenya
Kiribati
Malta
Montserrat
Pitcairn
Russian Federation
Seychelles
Solomon Islands
South Africa
South Georgia and the South Sandwich Islands
Sri Lanka
St. Helena
Swaziland
Togo
Turks and Caicos Islands
Tuvalu
Ukraine
United Arab Emirates
United Kingdom
Uzbekistan
Serbia
Zimbabwe
Guernsey
Isle of Man
Jersey
7 $firstname $lastname$cr$streets$cr $city $state $postcode$cr$country firstname surname
street address
addressline2
city state postcode
country
American Samoa
Australia
Cambodia
Canada
Cayman Islands
China
Christmas Island
Cocos (Keeling) Islands
Colombia
Guam
Guyana
Heard and Mc Donald Islands
Japan
Korea, Republic of
Marshall Islands
Micronesia, Federated States of
Norfolk Island
Northern Mariana Islands
Pakistan
Palau
Puerto Rico
United States
United States Minor Outlying Islands
Virgin Islands (U.S.)
Curaçao
Sint Maarten (Dutch part)
8 $firstname $lastname$cr$streets $cr$city$cr$country firstname surname
street address
addressline2
city
country
Angola
Antigua and Barbuda
Aruba
Barbados
Benin
Bolivia
Botswana
Bouvet Island
Burundi
Cameroon
Central African Republic
Chad
Comoros
Congo
Côte d’Ivoire
Djibouti
Dominica
Eritrea
Fiji
Gambia
Grenada
Hong Kong
Libya
Macao
Malawi
Mali
Mauritania
Mauritius
Namibia
Qatar
Rwanda
Saint Lucia
Samoa
Sao Tome and Principe
Sierra Leone
Suriname
Tonga
Uganda
Vanuatu
Western Sahara
Yemen
9 $firstname $lastname$cr$streets $cr$postcode $city $state$cr$country firstname surname
street address
addressline2
postcode city state
country
Cuba
Honduras
Italy
Liberia
Mexico
Tunisia
Turkey
Vatican City State (Holy See)
10 $firstname $lastname$cr$streets$cr $city $postcode$cr$country firstname surname
street address
addressline2
city postcode
country
Anguilla
Antarctica
Bahamas
Bahrain
Bangladesh
Belize
Bermuda
Bhutan
Burkina Faso
Cook Islands
Timor-Leste
Indonesia
Jordan
Korea, Democratic People’s Republic of
Lebanon
Lesotho
Maldives
Mongolia
Nauru
Nepal
Bonaire, Sint Eustatius and Saba
New Zealand
Niue
Saint Vincent and the Grenadines
Saudi Arabia
Singapore
Taiwan
Tokelau
Virgin Islands (British)
Zambia
11 $firstname $lastname$cr$streets$cr $city $state$cr$postcode$cr$country firstname surname
street address
addressline2
city state
postcode
country
Brazil
Costa Rica
Ghana
Iraq
Thailand
12 $firstname $lastname$cr$streets$cr $postcode$cr$city $state$cr$country firstname surname
street address
addressline2
postcode
city state
country
Ecuador
Nicaragua
Peru
Sudan
13 $firstname $lastname$cr$streets$cr $city $postcode$cr$state$cr$country firstname surname
street address
addressline2
city postcode
state
country
Nigeria
14 $firstname $lastname$cr$streets $cr$postcode $city$cr$state$cr$country firstname surname
street address
addressline2
postcode city
state
country
Belarus
El Salvador
Guatemala
Kyrgyzstan
Malaysia
Mozambique
Panama
Tanzania, United Republic of
15 $firstname $lastname$cr$streets$cr $postcode$cr$city$cr$state$cr$country firstname surname
street address
addressline2
postcode
city
state
country
Oman
16 $firstname $lastname$cr$streets$cr $city $postcode $state$cr$country firstname surname
street address
addressline2
city postcode state
country
Papua New Guinea
Venezuela
17 $firstname $lastname$cr$streets$cr $city$cr$postcode $state$cr$country firstname surname
street address
addressline2
city
postcode state
country
Philippines
18 $firstname $lastname$cr$streets$cr $city$cr$state $postcode$cr$country firstname surname
street address
addressline2
city
state postcode
country
Brunei Darussalam
Viet Nam
19 $firstname $lastname$cr$city$cr$streets$cr $postcode$cr$country firstname surname
city
street address
addressline2
postcode
country
Hungary
20 $firstname $lastname$cr$streets$cr $postcode $city ($state)$cr$country firstname surname
street address
addressline2
postcode city (state)
country
Spain

The sources used to determine the address formats where informatica and loqate. Loqate appeared to be more recent and had more formats with postcodes.




Still have questions? Use the Search box in the upper right, or try the full list of FAQs. If you can't find it there, head over to the Zen Cart support forum and ask there in the appropriate subforum. In your post, please include your Zen Cart and PHP versions, and a link to your site.

Is there an error or omission on this page? Please post to General Questions on the support forum. Or, if you'd like to open a pull request, just review the guidelines and get started. You can even PR right here.
Last modified May 5, 2022 by brittainmark (8ba0cd2f).