1. Go to /catalog/product_info.php. Search and replace this code:
<td class="main"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?></td>
with this code:
<td class="main"><?php echo tep_draw_radio_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?></td>
2. Go to /catalog/inclues/functions/html_output.php and add the following code anywhere outside of other functions. Your done.
/*
FUNCTION "tep_draw_radio_menu" for use with osCommerce
Resides: /catalog/includes/functions/html_output.php
Called from: /catalog/product_info.php
Function modified from function "tep_draw_pull_down_menu"
Purpose: create radio buttons for product options instead of drop-down
10/04/05 - Barney Chastain - www.ashrava.com
*/
function tep_draw_radio_menu($name, $values, $default = '', $parameters = '', $required = false)
{
$field = '<label>';
if (tep_not_null($parameters)) $field .= ' ' . $parameters;
if (empty($default) && isset($GLOBALS[$name])) $default = stripslashes($GLOBALS[$name]);
for ($i=0, $n=sizeof($values); $i<$n; $i++) {
$field .= '<input type="radio" value="' . tep_output_string($values[$i]['id']) . '"';
$field .= ' name="' . tep_output_string($name) . '"';
if (tep_not_null($parameters)) $field .= ' ' . $parameters;
if ($default == $values[$i]['id']) {
$field .= ' SELECTED';
}
$field .= '>' . tep_output_string($values[$i]['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . '<br>';
}
$field .= '</label>';
if ($required == true) $field .= TEXT_FIELD_REQUIRED;
return $field;
}
Edited by Moufasa2, 05 October 2005, 20:56.















