Zen Cart Logo
Forums / Managing Customers and Orders / Invoice layout - swapping display of postcode and county

Invoice layout - swapping display of postcode and county

Locked

Views: 3,476

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
7 Nov 2006, 3:04 AM
#1
palm avatar

palm

New Zenner

Join Date:
Sep 2005
Location:
Earth.
Posts:
19
Plugin Contributions:
0

Invoice layout - swapping display of postcode and county

Which file do I need to edit to swap the position of the postal/zip code with the county field?

As in the UK, the postcode comes after the country name.

Thanks!

7 Nov 2006, 3:31 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Invoice layout - swapping display of postcode and county

Which version of Zen Cart are you using?
What contributions/addons/mods/customizations have you done/added to your site?

7 Nov 2006, 4:14 AM
#3
palm avatar

palm

New Zenner

Join Date:
Sep 2005
Location:
Earth.
Posts:
19
Plugin Contributions:
0

Re: Invoice layout - swapping display of postcode and county

oops - I am using 1.3.2

The only mods I have are the UK billing module to accept UK debit cards.

7 Nov 2006, 4:24 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Invoice layout - swapping display of postcode and county

In v1.3.5 a new layout format was added to the address_format table which supports the UK-preferred address structure.

INSERT INTO address_format VALUES (6, '$firstname $lastname$cr$streets$cr$city$cr$state$cr$postcode$cr$country','$postcode / $country');

.. and then the countries which use this 6th format were updated as well (Admin->Locations->Countries)

9 Nov 2006, 6:32 AM
#5
bigmacyin avatar

bigmacyin

New Zenner

Join Date:
Feb 2006
Location:
UK
Posts:
30
Plugin Contributions:
0

Re: Invoice layout - swapping display of postcode and county

I have changed and tested the 5 dropdown options in Countries format but none of them change the invoice to the following:

Customers Name
Address Line 1
Address Line 2
Town City
County
Postcode
Country

I am sure it is something I am doing wrong but could you maybe point me in the right direction please?

Many thanks.

H

PS My site is 1.3.6

3 Jan 2007, 11:09 PM
#6
barnamania avatar

barnamania

Zen Follower

Join Date:
Nov 2006
Location:
London, UK
Posts:
67
Plugin Contributions:
0

Re: Invoice layout - swapping display of postcode and county

BigMacYin:

I have changed and tested the 5 dropdown options in Countries format but none of them change the invoice to the following:

Customers Name
Address Line 1
Address Line 2
Town City
County
Postcode
Country

I am sure it is something I am doing wrong but could you maybe point me in the right direction please?

Many thanks.

H

PS My site is 1.3.6

I managed to work around the problem by inserting into SQL the following:

INSERT INTO address_format VALUES (7, '$firstname $lastname$cr$streets$cr$city$cr$postcode$cr$country','$postcode / $country');
Input this into Admin / Tools / Install SQL Patches.

Then, under Admin / Localisation / Countries, select United Kingdom, and set the address format to 7.

I removed the "state" field from what Dr. Byte put, and it comes out exactly the way I want it. I have disabled a lot of the inputs on the "log in" page, so I don't know if the way it comes out on your site will be different, but what I get is this:

Name, Surname
Street Address
Line 2
City
Postcode
Country

Hope this helps! I noticed it won't change invoices for orders already placed, but it does change the format for future orders.