Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2011
    Location
    Espoo, Finland
    Posts
    49
    Plugin Contributions
    0

    Default Countries dropdown menu

    Very tiny bug appearing in case the Country set up for the top of Countries dropdown menu is actually disabled (status=0) in Admin

    What we have:

    1. zen_get_country_list function, which seems unchanged from v1.3.9 ages

    2. Option to change status of Countres ("Active for shipping") is appeared somehere later in 1.5.x

    3. zen_get_country_name function returning empty string in case the Country is disabled ("Active for shipping" set to No) in Admin

    Thus, in order to avoid entries with no text in $countries_array, some additional check should be added into zen_get_country_list function code:

    Code:
        //process array of top-of-list entries:
        foreach ($countriesAtTopOfList as $key=>$val) {
          if (zen_get_country_name($val) != '') $countries_array[] = array('id' => $val, 'text' => zen_get_country_name($val));
        }
    PS Please do not tell me, calling zen_get_country_name function twice is idiotic - I did this for better visibility only
    PPS Sorry, if my explanations are not very clear, lack of sleep...

  2. #2
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,151
    Plugin Contributions
    11

    Default Re: Countries dropdown menu

    Three entries is probably enough for now.

    I'm sure someone will get back with you.

 

 

Similar Threads

  1. v157 Empty entries in countries dropdown menu
    By yesaul in forum Bug Reports
    Replies: 3
    Last Post: 16 Apr 2022, 01:51 PM
  2. v154 Countries dropdown missing in addresses
    By freedude in forum General Questions
    Replies: 3
    Last Post: 24 Feb 2016, 10:26 PM
  3. Header Dropdown Menu (CSS) Without the Dropdown???
    By hcd888 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 27 May 2009, 01:20 AM
  4. countries dropdown special issue
    By FrilansReklam in forum General Questions
    Replies: 2
    Last Post: 9 Apr 2009, 10:11 AM
  5. Countries Dropdown
    By crichw in forum Basic Configuration
    Replies: 2
    Last Post: 26 Nov 2006, 06:59 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR