Hide payment method if specific shipping method selected
Posted: Wed Oct 19, 2016 6:36 pm
Hi Everyone
I want to hide specific payment method (cash on delivery) if specific shipping method selected before. For example, if I check shipping method A , then in the next step, payment methods I have only one method to check ( other methods disabled or unable to check). I try to edit and add some code to payment_method.php and shipping_method.php file in controller/checkout directory, but so far I havent' find the solution.
I tried to get shipping method name/code and build a conditional statement in payments, but I don't know exactly how to deal with it.
Any other ideas how to solve this issue ?
Best
Bartosz
I want to hide specific payment method (cash on delivery) if specific shipping method selected before. For example, if I check shipping method A , then in the next step, payment methods I have only one method to check ( other methods disabled or unable to check). I try to edit and add some code to payment_method.php and shipping_method.php file in controller/checkout directory, but so far I havent' find the solution.
I tried to get shipping method name/code and build a conditional statement in payments, but I don't know exactly how to deal with it.
Any other ideas how to solve this issue ?
Best
Bartosz