Community Add-Ons

Add file to this package
Top » Payment Modules

checkout payment fix
for osCommerce Online Merchant v2.2

This minor modification moves the radio buttons to select payment method so that they are immediately to the left of the payment method name. That way it will be much more obvious to the customer which method goes with which button. This modification should be considered by any store that uses more than one payment method.

Why did I create this modification?

We use the payment methods of credit card and check/money order at our store, and with the default osCommerce placement of the payment selection radio buttons at the far right of the box, well away from the payment title, it seems that at least once a month we were getting a call from a customer who wondered why we were waiting for a check when he had entered his credit card information online. Obviously the customer had checked the button for check/money order instead of the one for credit card because the buttons were far enough away from the payment method title to make it hard to tell which button went with which payment method.

Legend:  Download   Report

Expand All / Collapse All

checkout payment fix 20 Jun 2015  

Checkout_payment.php update modified by Philip Salerno

This is built upon the work of Kevin Shelton and Brushwood. Thanks to both of them for their previous work. I modified the the placement of the TITLE_PLEASE_SELECT text constant, the Select icon, and the placement of the TEXT_SELECT_PAYMENT_METHOD constant so that the TEXT_SELECT_PAYMENT_METHOD constant does not start at the middle of the box and is not on the first line of the box. This places the TEXT_SELECT_PAYMENT_METHOD constant closer to the left. See the image in the zip file for their placement.

FIND THIS SECTION (approximately line 248-253):

<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
<td class="main" width="50%" valign="top"><?php echo TEXT_SELECT_PAYMENT_METHOD; ?></td>
<td class="main" width="50%" valign="top" align="right"><b><?php echo TITLE_PLEASE_SELECT; ?></b><br><?php echo tep_image(DIR_WS_IMAGES . 'arrow_east_south.gif'); ?></td>
<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
</tr>

AND REPLACE WITH THIS:

<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
<td class="main" width="7%" valign="top" align=left><b><?php echo TITLE_PLEASE_SELECT; ?></b><br><?php echo tep_image(DIR_WS_IMAGES . 'arrow_east_south.gif'); ?></td>
<td class="main" width="100%" align=left><?php echo TEXT_SELECT_PAYMENT_METHOD; ?></td>
<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
</tr>


Checkout payment update by Kevin L. Shelton

We use the payment methods of credit card and check/money order at our store, and with the default osCommerce placement of the payment selection radio buttons at the far right of the box, well away from the payment title, it seems that at least once a month we were getting a call from a customer who wondered why we were waiting for a check when he had entered his credit card information online. Obviously the customer had checked the button for check/money order instead of the one for credit card because the buttons were far enough away from the payment method title to make it hard to tell which button went with which payment method.

This minor modification moves the radio buttons to select payment method so that they are immediately to the left of the payment method name. That way it will be much more obvious to the customer which method goes with which button.

To install simply replace the /catalog/checkout_payment.php file with the one in this package.

Updated Instructions, by Brushwood, October, 2005: Thanks to Kevin for this excellent fix. The full file included in this contrib is perfect if you have no other modifications and you have a narrow page layout. For those who have modfications or full width sites, try this search and replace:

FIND THIS SECTION:

if (sizeof($selection) > 1) {
?>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
<td class="main" width="50%" valign="top"><?php echo TEXT_SELECT_PAYMENT_METHOD; ?></td>
<td class="main" width="50%" valign="top" align="right"><b><?php echo TITLE_PLEASE_SELECT; ?></b><br><?php echo tep_image(DIR_WS_IMAGES . 'arrow_east_south.gif'); ?></td>
<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
</tr>
<?php
} else {
?>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
<td class="main" width="100%" colspan="2"><?php echo TEXT_ENTER_PAYMENT_INFORMATION; ?></td>
<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
</tr>
<?php
}

$radio_buttons = 0;
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="100%" 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>




AND REPLACE WITH THIS:


if (sizeof($selection) > 1) {
?>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
<td class="main" width="50%" valign="top" align=left><b><?php echo TITLE_PLEASE_SELECT; ?></b><br><?php echo tep_image(DIR_WS_IMAGES . 'arrow_east_south.gif'); ?></td>
<td class="main" width="50%" valign="top"><?php echo TEXT_SELECT_PAYMENT_METHOD; ?></td>
<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
</tr>
<?php
} else {
?>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
<td class="main" width="100%" colspan="2"><?php echo TEXT_ENTER_PAYMENT_INFORMATION; ?></td>
<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
</tr>
<?php
}

$radio_buttons = 0;
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="100%" 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" align=left width=20><?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 class="main" align=left><b><?php echo $selection[$i]['module']; ?></b></td>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
</tr>

Checkout Payment fix 20 Jun 2015  
Checkout _payment fix updated modified 13 Aug 2014  
Instructions Updated 26 Oct 2005  
checkout payment fix 8 Sep 2005