Jump to content

Restrict payment methods


Recommended Posts

It's not possible by default. However, you can achieve something bu editing each payment module's hookPayment function.

Check which carrier is selected using $this->context->cart->id_carrier and disable accordingly :)

Thanks for the reply, can you explain better how to do ?

Link to comment
Share on other sites

  • 5 weeks later...

In the hookPayment function, as I said you can check which carrier id you want to disable. Say, our carrier has id 4

 

I can't check now, but if you do something like

 

if($this->context->cart->id_carrier == 4)

return;

 

 

The module should be hidden from sight

  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...