oh_prestashop Posted May 2, 2013 Share Posted May 2, 2013 (edited) Hello! Running 1.4.9 over here. I would like to disable a certain payment module (sofortueberweisung) when a user selects GBP oder USD as a currency. I thought this is what currency restrictions are for, so I've set them up accordingly: However this configuration has no effect. All payment modules are available for every currency. Does anybody know how to fix this? Thanks. Edited May 3, 2013 by avalia (see edit history) Link to comment Share on other sites More sharing options...
oh_prestashop Posted May 3, 2013 Author Share Posted May 3, 2013 no one? Link to comment Share on other sites More sharing options...
benjamin utterback Posted May 3, 2013 Share Posted May 3, 2013 Hi avalia, just for testing purposes. If you do the same for other payment modules, does it work? I'm thinking that it could be a localized module problem. Do the same for the first payment module (the one with the coins) and see if it works. Link to comment Share on other sites More sharing options...
oh_prestashop Posted May 3, 2013 Author Share Posted May 3, 2013 Thanks for getting back to me. I've tried various combinations of currencies and payment modules. No payment module ever gets disabled in the fronted or in other words: every payment module is always available. I'm not really a PHP [spam-filter]. Some hints where I should start debugging might be useful, too. Link to comment Share on other sites More sharing options...
pel024 Posted June 20, 2013 Share Posted June 20, 2013 (edited) I have this exact problem, also on 1.4.9. I want to restrict two modules, Sisow iDEAL and Sisow SofortBanking to only accept Euros. I have configured this in BO > Payment but it has no effect. The modules are available regardless of the currency currently selected. The problem is both of these payment systems only accept Euros, and just assume that is the currency selected, so if an order is £50, the customer pays €50! I had thought that this was a problem with the modules but now I'm thinking it's a PS issue. Did you ever find a solution? Edited June 20, 2013 by pel024 (see edit history) Link to comment Share on other sites More sharing options...
oh_prestashop Posted June 20, 2013 Author Share Posted June 20, 2013 > I had thought that this was a problem with the modules but now I'm thinking it's a PS issue. It is. >Did you ever find a solution? Not yet, but I've found a great developer who will probably be able to get into this and fix it. Link to comment Share on other sites More sharing options...
pel024 Posted June 28, 2013 Share Posted June 28, 2013 I've found a solution to this problem. This works on the modules I'm using (Sisow Sofortbanking and Sisow iDEAL) on PS1.4.9, but I think it should work on any modules/PS version but you should test. You need to edit your payment modules main php file i.e modulename.php Find the function hookpayment, and insert this code directly below this line: function hookPayment($params) { global $cart; $currency = new Currency($cart->id_currency); if($currency->iso_code !== 'EUR') return; This should disable the module if the currency is in anything except Euros. 2 Link to comment Share on other sites More sharing options...
kormisosh Posted October 11, 2013 Share Posted October 11, 2013 ^Yes, man, this works absolutely fine. Great! Thanks for the solution. Link to comment Share on other sites More sharing options...
Recommended Posts