How to change how your Magento addresses are printed (e.g. put postcode on a separate line)

How to change how your Magento addresses are printed (e.g. put postcode on a separate line)

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
Country

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
Monkton
ZZ1 1ES
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}}|

to

{{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.


Using One Stop Order Processing with eBay, Amazon, Magento, Shopify, Etsy, Onbuy, Flubit, X-Cart, eBid, SellerDeck, Oxatis, CubeCart, osCommerce, Interspire,CRE Loaded, ekmPowershop, Pinnacle Cart, Rakuten, RomanCart, Paypal, Asos, WooCommerce , PrestaShop, Groupon, Weebly, Mail Order, Telephone Sales, CDiscount,OpenCart, Channel Advisor, Royal Mail, MyHermes, UKMail, DPD, Yodel, UPS, Metapack, Parcel 2 go, Quickbooks, Sage, Xero, Parcelforce and Stripe