News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Is there any function to format addresses in a country-specific way?

Started by reinhold, November 16, 2012, 14:16:16 PM

Previous topic - Next topic

reinhold

As each country has its own address format (needed e.g. for the invoices), it doesn't make sense in my invoice templates to try to format the invoice address manually, as that will break for foreign countries. Rather, the format needs to depend on the country of the address.
It seems that currently the invoice templates (e.g. mail_html_shopperaddresses.php or invoice.php) have the central-European format hardcoded and will break with any other country.

Is there any function in virtuemart that is able to format a given (shipping, billing or vendor) address according to the local standards of the respective country?

Thanks,
Reinhold

PS: The wikipedia article http://en.wikipedia.org/wiki/Address_%28geography%29#Mailing_address_format_by_country gives examples of >50 different countries, which have all different kinds of address formating...
And there is an even more concise page: http://www.columbia.edu/~fdc/postal/