Address formats - what are they?

Zen Cart Address formats - what are they?

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? No problem! Just head over to the Zen Cart support forum and ask there.
In your post, please include your Zen Cart and PHP versions, and a link to your site.

Last modified March 23, 2020 by Scott C Wilson (7eff069).