So_Not_an_HTML_genius Posted October 25, 2006 Posted October 25, 2006 Hi, I have a strange request...apparently here in the good ol' USA, we have become so "drive through..want it now..hurry hurry" that a couple of my customers hate the fact that the drop down list for countries has the US toward the end. So, to appease those folks, is there a way to adjust the display of the drop down list to show US first rather than in the alphabetical order it currently is in? I have only actually been working with OS Commerce for a month but am starting to really like it...I just wish I understood more about PHP and such so that I could figure this stuff out myself. I really will appreciate any info. Thanks, Kelly
KennethS Posted October 28, 2006 Posted October 28, 2006 Hi, I have a strange request...apparently here in the good ol' USA, we have become so "drive through..want it now..hurry hurry" that a couple of my customers hate the fact that the drop down list for countries has the US toward the end. So, to appease those folks, is there a way to adjust the display of the drop down list to show US first rather than in the alphabetical order it currently is in? I have only actually been working with OS Commerce for a month but am starting to really like it...I just wish I understood more about PHP and such so that I could figure this stuff out myself. I really will appreciate any info. Thanks, Kelly There is a very simple contibution that does this. You can do a search for it and all it does is set the default to United States. Kenneth S -------------- Customer "Are you a real programmer?" Me "No, but I did stay at a Holiday Inn Express last night"
jasonabc Posted October 29, 2006 Posted October 29, 2006 /includes/functions/html_output.php Replace the last function on that page with this: //// // Creates a pull-down list of countries function tep_get_country_list($name, $selected = '', $parameters = '') { # $countries_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT)); $countries_array = array(array('id' => '223', 'text' => 'United States')); $countries = tep_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 tep_draw_pull_down_menu($name, $countries_array, $selected, $parameters); } Jason My Contributions: Paypal Payflow PRO | Rollover Category Images | Authorize.net Invoice Number Fix
Recommended Posts
Archived
This topic is now archived and is closed to further replies.