Admin - Locations/Taxes - Countries
From Zen Cart(tm) Wiki
Menu: Admin - Locations/Taxes - Countries
Admin - Locations/Taxes Menu Items: Countries ·
Zones ·
Zones Definitions ·
Tax Classes ·
Tax Rates
Contents |
Description
- Defines every country and ISO-3166 2-letter and 3-letter country code. Also defines the address format for letters sent by postal mail.
Address format
List of international address formats by country.
There are at default five different address formats which can be selected from Admin > Locations/Taxes > Countries
under Address format.
Here are the explanations of each format included with a stock install:
Default address formats
Format #1
Firstname Lastname Address line 1 <optional second address line> City, Postcode State, Country
Address format code: $firstname $lastname$cr$streets$cr$city, $postcode$cr$statecomma$country
Address summary code: $city / $country
Format #2
Firstname Lastname Address line 1 <optional second address line> City, State Postcode Country
Address format code: $firstname $lastname$cr$streets$cr$city, $state $postcode$cr$country
Address summary code: $city, $state / $country
Format #3
Firstname Lastname Address line 1 <optional second address line> City Postcode - State, Country
Address format code: $firstname $lastname$cr$streets$cr$city$cr$postcode - $statecomma$country
Address summary code: $state / $country
Format #4
Firstname Lastname Address line 1 <optional second address line> City (Postcode) Country
Address format code: $firstname $lastname$cr$streets$cr$city ($postcode)$cr$country
Address summary code: $postcode / $country
Format #5
Firstname Lastname Address line 1 <optional second address line> Postcode City Country
Address format code: $firstname $lastname$cr$streets$cr$postcode $city$cr$country
Address summary code: $city / $country
Adding a new address format
The only thing you need to do in order to add a new address format, is to insert a new row into the address_format table.
Info about the available variables.
For example, insert this SQL statement from Admin > Tools > Install SQL Patches
INSERT INTO address_format
(address_format, address_summary)
VALUES ('$firstname $lastname$cr$streets$cr$postcode $city',
'$city / $country');
This would add a new format which looks like this:
Firstname Lastname Address line 1 <optional second address line> Postcode City
This would be accessed as the sixth address format, assuming you only have the five default ones already.
