Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

2.2 checkout_payment.php module visible but error like shipping possible ?


bugnet

Recommended Posts

Hi there peeps,

I want to know if is it possible to set na error on a payment module so they show up on checkout_payment.php but not selectable (no radio button) like shipping methods can do, they can show error w/o being selectable, actually I can't get it done by setting ['error'] on payment module and returning it on function selection()

 

return array('id' => $this->code,

'module' => $this->title,

'fields' => $fields);

 

to

 

return array('id' => $this->code,

'module' => $this->title,

'error' => 'you cannot select this payment method');

 

 

any ideas ?

Link to comment
Share on other sites

  • 3 weeks later...

done this setting ['error'] like just in shipping methods and modifying checkout_payment.php in some lines, like

 

<?php

if (sizeof($selection) > 1) {

echo ((is_null($selection[$i]['error'])) ? tep_draw_radio_field('payment', $selection[$i]['id']) : '');

 

 

and

 

 

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>

<?php

} elseif (isset($selection[$i]['fields']) && is_array($selection[$i]['fields'])) {

 

 

good if you have a payment method that you want to show to customers but not make them able to choose, except if they go back and pick another shipping method like cash on delivery just for hand delivery, or credit card just for postal office shipments.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...