Jump to content

Customizing shipping options so certain payment modules show


Recommended Posts

I'm having troubles with clients choosing wrong options when it comes to delivery e.g. there delivery methods A)24h pay with paypal, credit card, etc. B) pay cash on delivery and they choose A) while still paying only when the order arrives, aka B). And cash on delivery costs more than paying in advance. 

 

So, I'd like to know how could I customize my carriers so that certain payment options appear/don't appear. E.g. if people choose cash on delivery, then on the checkout the only options should be cash on delivery, and nothing else.

 

Thank you.

Link to comment
Share on other sites

Yes, it's not exactly easy to do it. Basically, for each payment method, open up the core php file (do you know php?). In the hookPayment method, get the carrier id (I can't remember the parameter name off the top of my head, you should try dumping $params and see if it's passed through that) and check if it's the one you want. The problem is, carrier ids will change if you edit them, so you'll have to do this again, over and over, every time yo update a carrier. Otherwise, create a module that does the check for you. But it's definitely not easy

Link to comment
Share on other sites

×
×
  • Create New...