Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Shipping dependent payment method


veszka

Recommended Posts

Hi,

 

I'm thinking about the following. If I choose for example the flat shipping method, I can provide only the banktransfer payment method nothing else.

This was only an example, but I think you can understand my idea. I can display from the shipping method only the relevant.

This is the idea, but I don't know how can I start it.

 

Could anyone help me?

 

Thank you!

Link to comment
Share on other sites

If you take the cash on delivery module as an example (cod.php):

if ($order->content_type == 'virtual') {
   $this->enabled = false;
}

 

you can extend it like:

if ($order->content_type == 'virtual' || $_SESSION['shipping']['id'] == 'flat_flat') {
   $this->enabled = false;
}

 

Like that you can easily disable payment modules based on chosen shiping method.

Link to comment
Share on other sites

If you take the cash on delivery module as an example (cod.php):

if ($order->content_type == 'virtual') {
   $this->enabled = false;
}

 

you can extend it like:

if ($order->content_type == 'virtual' || $_SESSION['shipping']['id'] == 'flat_flat') {
   $this->enabled = false;
}

 

Like that you can easily disable payment modules based on chosen shiping method.

 

That's cool.:) Thank you!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...