Forums / Templates, Stylesheets, Page Layout / Make USA appear first in countries list

Make USA appear first in countries list

Locked

Views: 1,202

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
29 May 2007, 7:41 PM
#1
saikii avatar

saikii

New Zenner

Join Date:
May 2007
Posts:
8
Plugin Contributions:
0

Make USA appear first in countries list

Hi Everyone!

I am trying to customize my countries list so that it shows United States at the top. (Direct request from client)

I tried changing it's id in the database from 223 to 0, but that had no effect.

Anyone have any ideas?

Thanks in advance

29 May 2007, 7:45 PM
#2
ajeh avatar

ajeh

Oba-san

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

Re: Make USA appear first in countries list

You do not want to change the id ... that would not be good ...

You can set a default on new accounts in the Configuration ... Customer Details ...

Create Account Default Country ID
Set Create Account Default Country ID to:
Default is 223

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!

29 May 2007, 7:49 PM
#3
saikii avatar

saikii

New Zenner

Join Date:
May 2007
Posts:
8
Plugin Contributions:
0

Re: Make USA appear first in countries list

I changed the ID back to 223, thanks!

I need this functionality for for guests, however. Most of the custom forms on our site do not require registration to complete.

29 May 2007, 7:51 PM
#4
ajeh avatar

ajeh

Oba-san

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

Re: Make USA appear first in countries list

Have you an URL to something on your site where it is not defaulting to the United States?

This is the default with Zen Cart, btw ... :smile:

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!

29 May 2007, 8:09 PM
#5
saikii avatar

saikii

New Zenner

Join Date:
May 2007
Posts:
8
Plugin Contributions:
0

Re: Make USA appear first in countries list

It's a variation on the normal zen cart function zen_get_country_list().

I could not get a return value other than the country id # to kick back when I used the normal function, so I copied it and changed it so it writes out the country name as a value for the <option> tag.

This part works great and it is almost exactly the same as the normal zen function, I just need USA to go to the top of the list.

30 May 2007, 5:00 AM
#6
saikii avatar

saikii

New Zenner

Join Date:
May 2007
Posts:
8
Plugin Contributions:
0

Re: Make USA appear first in countries list

In case anyone wants to know this (and it seems quite obvious now that I've had time to rummage around through the code) The function "zen_get_country_list()" has 3 parameters, the **second **of which corresponds to the default selected value for the list that is output.

Since I tweaked my function a bit, I simply passed 'United States' as the parameter and now that comes up as selected by default.

:clap: