istox Posted October 10, 2010 Share Posted October 10, 2010 Hello Guys!I have the trouble here.I have 2 shipping carriers. And I want to use COD method of payment. What I want to ask...1) Carrier 1 accepts all payments methods except COD2) Carrier 2 accepts all payments methods with CODI don't imagine how to do this. Please help. Link to comment Share on other sites More sharing options...
rocky Posted October 11, 2010 Share Posted October 11, 2010 Unfortunately, PrestaShop doesn't let you restrict carriers by payment type. You will need to modify code. Try adding the following after line 447 (the foreach line) of classes/Module.php (in PrestaShop v1.3.2): if ($module['name'] != 'cashondelivery' OR ($module['name'] == 'cashondelivery' AND $cart->id_carrier != 1)) Change 1 to the ID of the carrier you want to hide "Cash on Delivery". Link to comment Share on other sites More sharing options...
istox Posted October 11, 2010 Author Share Posted October 11, 2010 Great Thanks! +1000 Working on Prestashop 1.3.1. Link to comment Share on other sites More sharing options...
JohnADK Posted May 14, 2011 Share Posted May 14, 2011 How do I do this in 1.3.7? I don't find this code in this file in 1.3.7.Thanks. Link to comment Share on other sites More sharing options...
rocky Posted May 14, 2011 Share Posted May 14, 2011 I just checked and the code is the same in both PrestaShop v1.3.2 and v1.3.7, so I don't understand the problem. The line above goes after the following line (or maybe before would be more efficient): if (($moduleInstance = Module::getInstanceByName($module['name'])) AND is_callable(array($moduleInstance, 'hookpayment'))) Link to comment Share on other sites More sharing options...
JohnADK Posted May 19, 2011 Share Posted May 19, 2011 Oh, yes. I must have searched too fast or typed wrongly.I found it now and it works like a charm! Great and easy solution - Many thanks! Link to comment Share on other sites More sharing options...
Irfas Posted June 1, 2011 Share Posted June 1, 2011 Does anybody adapted it to 1.4? It worked realy nice on 1.3. Seems there are many changes in 1.4 and i can't find the right places to change. Link to comment Share on other sites More sharing options...
Artizzz Posted June 1, 2011 Share Posted June 1, 2011 Does anybody adapted it to 1.4? It worked realy nice on 1.3. Seems there are many changes in 1.4 and i can't find the right places to change. In 1.4 you can use Ship2Pay module. Link to comment Share on other sites More sharing options...
Irfas Posted June 1, 2011 Share Posted June 1, 2011 Thanks!Does anybody have a link? As original location show "out of stock" Link to comment Share on other sites More sharing options...
Artizzz Posted June 2, 2011 Share Posted June 2, 2011 Thanks!Does anybody have a link? As original location show "out of stock" http://www.prestashop.com/forums/viewthread/95066/hlavn_diskuze/upravene_moduly_pro_verzi_1_dot_4__dobrka_hotov_ship2pay There you can find all information and files. Link to comment Share on other sites More sharing options...
Irfas Posted June 2, 2011 Share Posted June 2, 2011 Thanks, it is working! (downloaded for 1.4.17 version). Link to comment Share on other sites More sharing options...
babyewok Posted August 30, 2011 Share Posted August 30, 2011 Ship2Pay doesn't seem to work on v.1.4.4 - anyone got it working? 1 Link to comment Share on other sites More sharing options...
geet_16 Posted April 22, 2017 Share Posted April 22, 2017 I have 2 shipping carriers. And I want to use COD method of payment. What I want to ask...(prestashop v1.6)1) Carrier 1 accepts all payments methods except COD2) Carrier 2 accepts all payments methods without COD Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now