Jump to content

[SOLVED] Disable carrier for the payment module Prestashop 1.4.4.1


Recommended Posts

Hello to everyone!

 

I searched the forum about my problem. But really no solution was found about my problem.

 

I have 2 carriers. And I have 5 payments modules.

 

How I can disable 1 payment module for the 2nd carrier? Or 2nd carrier if customer choose COD module?

 

Earlier there was a code in classes/modules.php which disabled the carrier id for the payment module COD.

 

 

if ($result)

foreach ($result AS $k => $module)

if (($moduleInstance = Module::getInstanceByName($module['name'])) AND is_callable(array($moduleInstance, 'hookpayment')))

if ($module['name'] != 'cashondelivery' OR ($module['name'] == 'cashondelivery' AND $cart->id_carrier != 2))

 

But for me it is not working now on presta 1.4.4.1. May be there is other solutions or code?

Link to comment
Share on other sites

  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...