Forums / Managing Customers and Orders / Exclude home country

Exclude home country

Started by tphoare on 15 Apr 2011, 9:58 AM · Views: 1,231

Results 1 to 6 of 6
15 Apr 2011, 9:58 AM
#1
tphoare avatar

tphoare

New Zenner

Join Date:
Sep 2005
Location:
London
Posts:
88
Plugin Contributions:
0

Exclude home country

How can I exclude the home country address from a customers displayed address details.

It is obviously unnecessary to show the country on an address label unless the order is being sent overseas. Have sorted this out before but can't remember how and thought it was just a matter of correctly setting the store and shipping details in Admin but doesn't seem to work this time.

Thanks

15 Apr 2011, 2:14 PM
#2
ebusinessman avatar

ebusinessman

Zen Follower

Join Date:
Jul 2006
Posts:
132
Plugin Contributions:
0

Re: Exclude home country

use php to detect if country name meets your home country, if yes, don't display it.

should be easy.

15 Apr 2011, 2:35 PM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Exclude home country

The address formats are held in the database table:
address_format

These are then linked to the table:
countries

if you need a different format from what the defaults are, but just for your own country, you could add another format and change the field:
address_format_id

in the table:
countries

to the field:
address_format_id

any existing Order in the table:
orders

and update the fields for the 3 address_format_id used for customer, delivery and billing ...

The reason to make a new address format for you country is that other countries could be using the current one, and those you may wish to keep in the original format ...

If you do not need to keep the original format for other countries, then you could customize the existing address_format ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

15 Apr 2011, 2:41 PM
#4
ebusinessman avatar

ebusinessman

Zen Follower

Join Date:
Jul 2006
Posts:
132
Plugin Contributions:
0

Re: Exclude home country

first time to know this, thanks Ajeh

15 Apr 2011, 2:46 PM
#5
tphoare avatar

tphoare

New Zenner

Join Date:
Sep 2005
Location:
London
Posts:
88
Plugin Contributions:
0

Re: Exclude home country

Thanks, had a Eureka moment and in the short while it took for you two to post remembered how to do it - dived into phpmyadmin and sorted it.

Thanks again

15 Apr 2011, 2:47 PM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Exclude home country

Thanks for the update that this is now working for you as needed ... :smile:

What method did you use that worked best for you?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!