Page 1 of 1

[v1.5+] how to move postcode..? (address format)

Posted: Mon Dec 26, 2011 1:10 pm
by Melanie
Ok, so heres my question...

How can I re-arrange the address format (that you see on the invoice and the order form)

Right now opencart is set up to put it in this order:
First Name:
Last Name:
Address 1:
Address 2:
City:
Postcode:
Region / State:
Region / State Code:
Country:

I want it to show as:
First Name:
Last Name:
Address 1:
Address 2:
City:
Region / State:
Region / State Code:
Postcode:
Country:


Can anyone advise?
Has anyone carried out this mod in 1.5+


Thanks a lot!
Mel

Re: [v1.5+] how to move postcode..? (address format)

Posted: Mon Dec 26, 2011 3:27 pm
by fido-x
In "catalog/model/checkout/order.php", lines 262 and 296 read:

Code: Select all

$format = '{firstname} {lastname}' . "\n" . '{company}' . "\n" . '{address_1}' . "\n" . '{address_2}' . "\n" . '{city} {postcode}' . "\n" . '{zone}' . "\n" . '{country}'; 
To put them the way you want them, change to:

Code: Select all

$format = '{firstname} {lastname}' . "\n" . '{company}' . "\n" . '{address_1}' . "\n" . '{address_2}' . "\n" . '{city}' . "\n" . '{zone} {postcode}' . "\n" . '{country}'; 

Re: [v1.5+] how to move postcode..? (address format)

Posted: Wed Dec 28, 2011 9:05 am
by Melanie
Excellent, thank you very much!
Merry Christmas.