Jump to content



Photo

Product Attributes Radio Buttons split into 2 columns?


  • Please log in to reply
No replies to this topic

#1   steve_spaces

steve_spaces
  • Members
  • 43 posts
  • Real Name:steve
  • Gender:Male
  • Location:UK

Posted 19 January 2011 - 23:28

Hi there, I wonder if someone here can help because i've been struggling with this for weeks.

Basically I have a shop that sells products in various quantities ranging from 100 to 100,000. I've set the product attributes and have radio buttons to display the options with their respective prices. What i'm trying to do to make the product info page look tidy is have the options set out so that the option value is in two columns. ie I have the radio button and next to it the quantity, then in another column have the price. Or even better I would have 3 columns in a row, one with the radio button, one with the quantity and one with the price.

I think I have the code than needs changing which is this:



// Output a form radio menu for product info page maniac101
function tep_draw_radio_menu($name, $values, $default = '', $parameters = '', $required = false) {
$field ='';
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 .= '<div class="prod-items"><input type="radio" name="' . $name . '" value="' . $value . '"';
if ($i == 0) $field .= ' checked';

$field .= '>' . tep_output_string($values[$i]['text'], array('"' => '&quot;', '\'' => ''', '<' => '&lt;', '>' => '&gt;')) . '<br /></div>';
}
$field .= '';

if ($required == true) $field .= TEXT_FIELD_REQUIRED;

return $field;
}

////

As you can see i've already added <div class="prod-items"> so that I can style the row, but I can't see where I could put another to split the row into columns.

Anyone have any ideas? Would be much appreciated.

Thanks