ec_country_widget db { default " " } { select_name "country_code" } { size_subtag "size=4" }What it does:
Just like country_widget, except it's not United States centric.Defined in: /web/philip/tcl/ecommerce-widgets.tcl
Source code:
set widget_value "<select name=\"$select_name\" $size_subtag>\n" if { $default == "" } { append widget_value "<option value=\"\" SELECTED>Choose a Country</option>\n" } set selection [ns_db select $db "select country_name, iso from country_codes order by country_name"] while { [ns_db getrow $db $selection] } { set_variables_after_query if { $default == $iso } { append widget_value "<option value=\"$iso\" SELECTED>$country_name</option>\n" } else { append widget_value "<option value=\"$iso\">$country_name</option>\n" } } append widget_value "</select>\n" return $widget_value