Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2006
    Location
    Dartmouth, NS Canada
    Posts
    2,378
    Plugin Contributions
    0

    Default How can I modify the country list?

    Hi,

    99.9% of my sales come from the US and Canada. For customer convenience, I'd like the country drop-down list to start like this...

    Canada
    United States
    ---------------
    Aaland Islands
    ...etc....
    ...etc....
    ...etc....

    Canada and United States may be duplicated in their normal location in the list or not; it matters not to me. But getting those two to display at the top does matter.

    I know I can edit the country list via admin, but that's for adding or removing countries. There are no options for rearranging things the way I want them. So...

    Where can I edit the list to be the way I want it? And if it's the database, could you perhaps suggest the SQL statement to do the trick?

    Thanks for any help with this,

    Rob

  2. #2
    Join Date
    Nov 2006
    Location
    Dartmouth, NS Canada
    Posts
    2,378
    Plugin Contributions
    0

    Default Re: How can I modify the country list?

    Still no answers, and I'm about to slide off the page!!

    Anyone?

    Rob

  3. #3
    Join Date
    Mar 2007
    Posts
    159
    Plugin Contributions
    0

    Default Re: How can I modify the country list?

    here's half of it
    /includes/functions/html_output.php
    make

    function zen_get_country_list($name, $selected = '', $parameters = '') {
    $countries_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT));
    $countries = zen_get_countries();
    for ($i=0, $n=sizeof($countries); $i<$n; $i++) {
    $countries_array[] = array('id' => $countries[$i]['countries_id'], 'text' => $countries[$i]['countries_name']);
    }
    return zen_draw_pull_down_menu($name, $countries_array, $selected, $parameters);
    }

    look like

    function zen_get_country_list($name, $selected = '', $parameters = '') {
    $countries_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT));
    $countries_array[] = array('id' => '223', 'text' => 'United States');
    $countries_array[] = array('id' => '38', 'text' => 'Canada');
    $countries = zen_get_countries();
    for ($i=0, $n=sizeof($countries); $i<$n; $i++) {
    $countries_array[] = array('id' => $countries[$i]['countries_id'], 'text' => $countries[$i]['countries_name']);
    }
    return zen_draw_pull_down_menu($name, $countries_array, $selected, $parameters);
    }

    it is still defaulting to the second US at the bottom of the list for me, still working on where to find that. /includes/modules/create_account.php? its getting to the end of the day on friday and the 'ol brain isn't working very well

  4. #4
    Join Date
    Nov 2006
    Location
    Dartmouth, NS Canada
    Posts
    2,378
    Plugin Contributions
    0

    Default Re: How can I modify the country list?

    I know the feeling!

    Thank you very much for that. I'll try it out tomorrow, when my brain wakes up again. Right now I'm going to sit down and put my feet up and watch Metropolis. I like old movies. ;-)

    Rob

  5. #5
    Join Date
    Nov 2006
    Location
    Dartmouth, NS Canada
    Posts
    2,378
    Plugin Contributions
    0

    Default Re: How can I modify the country list?

    it is still defaulting to the second US at the bottom of the list for me
    Yeah, does the same for me too. Must be somewhere in admin that the default is set. I have a vague memory of that. I'll go spelunking for it.

    In the meantime I changed the added lines to this...
    Code:
        $countries_array[] = array('id' => '38', 'text' => 'Canada');             /* added */
        $countries_array[] = array('id' => '223', 'text' => 'United States');     /* added */
        $countries_array[] = array('id' => '', 'text' => '--------');             /* added */
    That gives me the order and the separator line I want. And it works, except for that default, and I'll go find that now... ... ... ...

    In admin/configuration/Customer Details I set Create Account Default Country ID to "none". Interestingly the list now defaults to my separator line, not to the first line where it says "Please Choose Your Country". Now to change (or eliminate) that text, and I'll be happy. ... ... ...

    Did that in includes/languages/english.php -- changed it to "Please select...". Brief is good.

    I'm happy.

    Rob

 

 

Similar Threads

  1. Replies: 1
    Last Post: 27 Sep 2015, 11:45 AM
  2. Replies: 2
    Last Post: 6 Jul 2010, 08:56 PM
  3. How to Add City list for the Country China
    By OhISeekYou in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 1
    Last Post: 6 Aug 2007, 09:31 AM
  4. How do i modify the size of the text in the list of products in a category listing?
    By humbll in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 14 Jul 2007, 10:46 PM
  5. How can I change the manufacturer list to a drop list?
    By maxima in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 16 Oct 2006, 04:02 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