shotputty Posted November 11, 2008 Share Posted November 11, 2008 For all of you who would like to have specific countries ONLY in the list for customers using a specific chosen language on your site. I made this contribution: http://addons.oscommerce.com/info/6357 Let me know if there are any question of if I should enhance it more. ;) Link to comment Share on other sites More sharing options...
[email protected] Posted December 28, 2008 Share Posted December 28, 2008 Hello, I've some problem with my dropdown list. My pulldown list look like this: Austria Belgium Denmark Germany ---------- Austria Belgium Denmark Germany ---------- Austria Belgium Denmark Germany ---------- Austria Belgium Denmark Germany ---------- and so on. Do you know what I maybe can do that the list look like(without repeat): Austria Belgium Denmark Germany ---------- Thanks you so much. greets! Thank you very much for your answer! Now it looks like: Please select: Austria Belgium Denmark Germany ---------- But "-------" is pre selectet instead of: "Please select:" I could solve the problem by using the preselection by browser but because the preselection for AOL users from Germany would be USA, I can't use this. Do you know what I maybe can do that "Please select" will be preselected on first place instead of ---------? Thank you very much for your help! Link to comment Share on other sites More sharing options...
[email protected] Posted December 28, 2008 Share Posted December 28, 2008 Hey, I solved the problem. You should add the } at the end, then it works fine. ;-) So it look like this: while ($countries_values = tep_db_fetch_array($countries)) { $cid=$countries_values['countries_id']; if ($cid==14 || $cid==73 || $cid==81 ||$cid==204 ||$cid==222 ){ // these country codes are not added to the alfabetical list } else { // add normally $countries_array[] = array('countries_id' => $countries_values['countries_id'], 'countries_name' => $countries_values['countries_name']); } } // add the items at the top of the list, end with a separator array_unshift($countries_array, array('countries_id' => 14, 'countries_name' => "Austria"), array('countries_id' => 73, 'countries_name' => "France"), array('countries_id' => 81, 'countries_name' => "Germany"), array('countries_id' => 204, 'countries_name' => "Switzerland"), array('countries_id' => 222, 'countries_name' => "United Kingdom"), array('countries_id' => 9999, 'countries_name' => "--------------") ); } return $countries_array; } Thank you, for work! greets! Hello, I've some problem with my dropdown list. My pulldown list look like this: Austria Belgium Denmark Germany ---------- Austria Belgium Denmark Germany ---------- Austria Belgium Denmark Germany ---------- Austria Belgium Denmark Germany ---------- and so on. Do you know what I maybe can do that the list look like(without repeat): Austria Belgium Denmark Germany ---------- Thanks you so much. greets! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.