Welcome to the One Stop Order Processing help desk
Search the Knowledge Base
Knowledgebase - Click on the section titles to see more categories and articles: Magento > Reports
How to change how your Magento addresses are printed (e.g. put postcode on a separate line)
Posted by OSOP Support, Last modified by Zoe Strassen on 23 October 2017 11:12 AM

Parts of the address need to be put onto separate lines (e.g. postcode)

By default Magento displays addresses in the following format:

Customer Name,
Address Line 1, Address Line 2
Address Line 3, Town, Post Code

For example,

Emily Took Brown
The Larches, Appletonea
Monkton, ZZ1 1ES
United Kingdom

You can change the format by using the approach shown below. For example, to put the postcode onto a separate line, shown below:

Emily Took Brown
The Larches, Appletonea
United Kingdom

If you are using one of the newer Magento versions you can change the format in the Configuration options, if this isn't available use item 4 onwards.

1 Select the System->Configuration menu option.

2 On the left hand side if you click on Customer Configuration.

3 In the Address Templates section amend the values in the PDF section. This is described below in item 6.

4 On your website open the file app/code/core/Mage/Customer/etc/config.xml

5 Find the section called pdf (look for the word pdf). You will find the line shown below:

<pdf translate="title" module="customer">

6 The text after this describes how to layout the addresses. To put text onto a new line use a | character. For example, to put the postcode onto its own line change

{{if city}}{{var city}}, {{/if}}{{if region}}{{var region}}, {{/if}}{{if postcode}}{{var postcode}}{{/if}}|


{{if city}}{{var city}}, {{/if}}{{if region}}{{var region}}| {{/if}}{{if postcode}}{{var postcode}}{{/if}}|

NOTE: The address description may be slightly different than that shown above for different Magento versions.

(0 vote(s))
Not helpful

Comments (0)
Post a new comment
Full Name: