Address formats - what are they?

How addresses are displayed in different countries

You may have noticed the address format value ranges between 1 and 6. The Uk is 6 and most other countries are 1. 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:



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


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

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


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

Default Entries

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

As of Zen Cart 1.5.6, they are:

1 $firstname $lastname
$city, $postcode
$statecomma$country,$city / $country
2 $firstname $lastname
$city, $state $postcode
$country,$city, $state / $country
3 $firstname $lastname
$postcode - $statecomma$country,$state / $country
4 $firstname $lastname
$city ($postcode)
$country, $postcode / $country
5 $firstname $lastname
$postcode $city
$country,$city / $country
6 $firstname $lastname
$country,$postcode / $country
7 $firstname $lastname
$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

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 September 14, 2020 by Scott C Wilson (32f6c238).