i have the remove dropdown menu with radio buttons, but your solutions not work, how to have for remove the dropdown? thanks!
Latest News: (loading..)
Remove the product attribute drop-down box if only one attribute
Started by JNKeil, Jan 07 2009 03:27 PM
21 replies to this topic
#21
Posted 14 April 2012 - 12:31 PM
#22
Posted 14 April 2012 - 01:29 PM
To get radio buttons working you need to add to your includes/functions/general.php
Then in your products_info.php change
tep_draw_pull_down_menu
to
tep_draw_radio_menu
////
// 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 . '"';
if ($i == 0) $field .= ' checked';
$field .= '>' . tep_output_string($values[$i]['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . '<br />';
}
$field .= '</td></tr></table>';
if ($required == true) $field .= TEXT_FIELD_REQUIRED;
return $field;
}
Then in your products_info.php change
tep_draw_pull_down_menu
to
tep_draw_radio_menu
REMEMBER BACKUP, BACKUP AND BACKUP
I am not a coder, so dont bother sending PMs asking for help as you wont get any.
OSC has a steep learning curve, but in general the program does work. If it doesnt work, the chances are it is something you have done.
I am not a coder, so dont bother sending PMs asking for help as you wont get any.
OSC has a steep learning curve, but in general the program does work. If it doesnt work, the chances are it is something you have done.









