Very tiny bug appearing in case the Country set up for the top of Countries dropdown meny 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...
Bookmarks