Results 1 to 6 of 6
  1. #1
    Join Date
    May 2007
    Posts
    8
    Plugin Contributions
    0

    Default 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

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default 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!

  3. #3
    Join Date
    May 2007
    Posts
    8
    Plugin Contributions
    0

    Default 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.

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default 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 ...
    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!

  5. #5
    Join Date
    May 2007
    Posts
    8
    Plugin Contributions
    0

    Default 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.

  6. #6
    Join Date
    May 2007
    Posts
    8
    Plugin Contributions
    0

    Default 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.


 

 

Similar Threads

  1. v154 List of EU Countries
    By irishshoppercom in forum General Questions
    Replies: 2
    Last Post: 3 Aug 2015, 10:14 AM
  2. v151 Zones- setting up for countries outside of the USA
    By KrisFoxton in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 4 Oct 2013, 01:26 AM
  3. How to make newer products appear first?
    By dolleface in forum General Questions
    Replies: 5
    Last Post: 18 Feb 2011, 01:54 AM
  4. Countries....need your list.
    By ecommercegirl in forum General Questions
    Replies: 6
    Last Post: 17 Jan 2007, 12:33 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg