Eprime Posted July 9, 2008 Posted July 9, 2008 (edited) Hello all, I have installed the following contributions: http://www.oscommerce.com/forums/index.php?showtopic=123629 (Sorting the order of the product's attributes based on price) and http://www.oscommerce.com/community/contri...ll/search,radio (Making it so that the attributes are radio buttons instead of a drop down selection) However, it seems like the radio attribute automatically chooses the bottom first selection instead of the default top one. I know this is a simple fix in PHP, but Im a bit stumped. I believe it lies somewhere in this code: //// // Output a form radio menu for product info page maniac101 function tep_draw_radio_menu($name, $values, $default = '', $parameters = '', $required = false) { $field ='<table border="0" cellspacing="0" cellpadding="0"><tr><td class="main">'; if (empty($default) && isset($GLOBALS[$name])) $default = stripslashes($GLOBALS[$name]); for ($i=0, $n=sizeof($values); $i<$n; $i++) { $value = tep_output_string($values[$i]['id']); $field .= '<input type="radio" name="' . $name . '" value="' . $value . '"'; $field .= ' checked'; $field .= '>' . tep_output_string($values[$i]['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . '</br>'; } $field .= '</td></tr></table>'; if ($required == true) $field .= TEXT_FIELD_REQUIRED; return $field; } //// Would anyone have a clue? Edited July 9, 2008 by Eprime Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.