Loki Directory Country Format Manager
This modules allows for managing different address templates per country, so that the visual appearance of the addresses matches the country.
The standard way in which addresses are displayed
When an address is entered, it is displayed as a single line or as multiple lines. For instance, by default, the billing address and the shipping address are shown in the order summary within the sidebar. The way that the address is being displayed is being determined by so-called address templates.
By default, within the Magento Admin Panel, you can configure address templates within the Store Configuration via Customers > Customer Configuration > Address Templates and then for various address template types: Text, one-liner, HTML or PDF. This setting can be configured globally, per Website-scope or per Store-scope.
The problem with this standard behavior
The problem with this standard behavior is that the address templates are being applied per scope, but not per country, while actually the formatting can be very different for different countries.
In The Netherlands, an address is often displayed as the following (with all street parts on a single line and the postal code preceding the city):
Example Street 123 0000AA Amsterdam Netherlands
Yet, in the United Kingdom, an address is often displayed as the following (with all street parts on separate lines and the postal code coming after the city):
Some building Example Street 123 London 12A-BC3 United Kingdom
The solution of this module
This module allows for managing different address templates per country. Within the Magento Admin Panel, you navigate
Example Dutch address template
For example, with the country being set to NL and the address template being HTML, the address format could look like this:
{{depend prefix}}{{var prefix}} {{/depend}}
{{var firstname}} {{depend middlename}}{{var middlename}} {{/depend}}{{var lastname}}{{depend suffix}} {{var suffix}}{{/depend}}{{depend firstname}}<br />{{/depend}}
{{depend company}}{{var company}}<br />{{/depend}}
{{if street1}}{{var street1}} {{var street2}} {{var street3}}<br/>{{/if}}
{{if postcode}}{{var postcode}}{{/if}} {{if city}}{{var city}}{{/if}}<br />
{{var country}}<br />
{{depend telephone}}T: {{var telephone}}{{/depend}}
{{depend fax}}<br />F: {{var fax}}{{/depend}}
{{depend vat_id}}<br />VAT: {{var vat_id}}{{/depend}}