I want to change Magento's standard address format on the customer address page. How can I do that?
For those who don't know the address format, it is the method in wich we write the address. For example, the english format for France is this:
Addressee (Natural person/Organization) More detailed description of addressee (optional) Housenumber + Streetname Postal code + uppercase town Country (if other than France)
The address format for the USA is this:
Name of address Street number and name Name of town, State abbreviation + ZIP code (typical handwritten format)
You can read more at wikipedia. Thanks a lot.
It seems that the config.xml file is no longer used (or just to load the default values into the database).
Go to:
System->Configuration->Customer->Customer Configuration and scroll down to Address Templates.
There you find the same code as in the XML file.
Generally speaking the address formats are contained in app/code/core/Mage/Customer/config.xml look for some markup like this:
...
<default>
<customer>
<address_formats>
<text><![CDATA[{{depend prefix}}{{var prefix}} {{/depend}}{{var firstname}} {{depend middlename}}{{var middlename}} {{/depend}}{{var lastname}}{{depend suffix}} {{var suffix}}{{/depend}}
{{depend company}}{{var company}}{{/depend}}
{{if street1}}{{var street1}}
{{/if}}
{{depend street2}}{{var street2}}{{/depend}}
{{depend street3}}{{var street3}}{{/depend}}
{{depend street4}}{{var street4}}{{/depend}}
{{if city}}{{var city}}, {{/if}}{{if region}}{{var region}}, {{/if}}{{if postcode}}{{var postcode}}{{/if}}
{{var country}}
T: {{var telephone}}
{{depend fax}}F: {{var fax}}{{/depend}}}]]></text>
</address_templates>
</customer>
</default>
...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With