Radio Buttons to Check Boxes - I am having great success with this contrib, and have used it for over a year now. Many thanks for everyones efforts.
I want to switch the radio buttons to check boxes and it's clearly more complicated than I thought. I reveiwed the checkout_payment.php file and I see where it draws the radio buttons, but it's clearly not as easy as just changing from:
input_type="radiobutton" to input_type="checkbox"
I'm confident the changes need to be made in this area:
<?php
}
$radio_buttons = 0;
$payment = (!$payment) ? 'paypal_wpp' : $payment;
for ($i=0, $n=sizeof($selection); $i<$n; $i++) {
?>
<tr>
<td><?php //echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
<td colspan="2"><table border="0" width="90%" align=left cellspacing="0" cellpadding="2">
<?php
if ( ($selection[$i]['id'] == $payment) || ($n == 1) ) {
echo ' <tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
} else {
echo ' <tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
}
?>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
<td class="main" colspan="3"><b><?php echo $selection[$i]['module']; ?></b></td>
<td class="main" align="right">
<?php
if (sizeof($selection) > 1) {
echo tep_draw_radio_field('payment', $selection[$i]['id']);
} else {
echo tep_draw_hidden_field('payment', $selection[$i]['id']);
}
?>
</td>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
</tr>
<?php
if (isset($selection[$i]['error'])) {
?>
<tr>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
<td class="main" colspan="4"><?php echo $selection[$i]['error']; ?></td>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
</tr>
//Start of CC fields
<?php
} elseif (isset($selection[$i]['fields']) && is_array($selection[$i]['fields'])) {
?>
<tr>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
<td colspan="4"><table border="0" cellspacing="0" cellpadding="2">
<?php
for ($j=0, $n2=sizeof($selection[$i]['fields']); $j<$n2; $j++) {
?>
<tr>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
<td class="main"><?php echo $selection[$i]['fields'][$j]['title']; ?></td>
<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
<td class="main"><?php echo $selection[$i]['fields'][$j]['field']; ?></td>
<td><?php //echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
</tr>
<?php
}
?>
</table><hr></td>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
</tr>
<?php
}
?>
</table></td>
<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
</tr>
<?php
$radio_buttons++;
}
?>
What do I change? Please help me and thank you again for your support.
Tom