♥14steve14 Posted May 16, 2017 Share Posted May 16, 2017 I am hoping that someone can give a bit of advice on how to restrict the payment methods for downloadable products to only PayPal. I have searched and not really found anything apart from an older addon that means that every product can have the payment method set, which is sort of what I want to do, but entails a lot of mods. There is also something that lists all the product ids in an array, but the list is ever expanding and currently nearing 300. As downloads are virtual products is there any way to select a virtual product and only allow say paypal standard for the payment method. Any other products purchased at the same time will also be payable using paypal. Any help welcome REMEMBER BACKUP, BACKUP AND BACKUP Link to comment Share on other sites More sharing options...
beerbee Posted May 16, 2017 Share Posted May 16, 2017 Hi, this reminded me http://www.oscommerce.com/forums/topic/411059-disable-particular-payment-module-depend-on-chosen-shipping-module-and-total-value/ might be a hint in it? Best regards Christoph Link to comment Share on other sites More sharing options...
AngusD Posted May 16, 2017 Share Posted May 16, 2017 Hi, you probably have to alter the payment-modules. Not sure if you can do this outside with a header_tag-module. There's a function in the shoppingCart-class: function get_content_type() You let the payment-modules check, if there's a download in the cart and if yes, the payment-module get's disabled. global $cart; if($cart->get_content_type() != 'physical'){ $this->enabled = false; } // disable payment-module if there's a download in the order (function update_status()) Not sure if this would work, didn't test it. You'd have to add it to every payment-module you use, except the PayPal-module. AD Link to comment Share on other sites More sharing options...
♥14steve14 Posted May 17, 2017 Author Share Posted May 17, 2017 I will try to get time to look into this ore tomorrow. RThanks for the advice so far. REMEMBER BACKUP, BACKUP AND BACKUP Link to comment Share on other sites More sharing options...
♥14steve14 Posted May 21, 2017 Author Share Posted May 21, 2017 On 16/05/2017 at 1:29 PM, beerbee said: Hi, this reminded me http://www.oscommerce.com/forums/topic/411059-disable-particular-payment-module-depend-on-chosen-shipping-module-and-total-value/ might be a hint in it? Best regards Christoph Many thanks fir the help. Seems to work like a charm. If an order now contains only downloads most payment modules are disabled which stops people paying using cheques and bank transfers. I am looking at the PWA addon where that allows users to select which payments are used so it might get improved and turned into a module yet if I can fathom out which bits of the code to use. REMEMBER BACKUP, BACKUP AND BACKUP Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.