epigos Posted January 18, 2013 Share Posted January 18, 2013 Hello, I have installed prestashop v1.5.3 and developed custom payment modules for it. My problem is that the "payment_execution.tpl" do not display for my custom payment modules in the mobile theme. Anytime i chose those payment methods the page loads to a blank page, but the default payment modules (bankwire, check ) works perfectly in the mobile theme. Please I need your help. Link to comment Share on other sites More sharing options...
GordyCZ Posted April 2, 2013 Share Posted April 2, 2013 Hello, I have same problem, after delivery metod I have blank page ( Link to comment Share on other sites More sharing options...
ZhenIT Software Posted December 3, 2013 Share Posted December 3, 2013 (edited) Umm.... this seems something quite evil from Prestashop. For payment modules they add the following condition $paypal_condition = ''; $iso_code = Country::getIsoById((int)Configuration::get('PS_COUNTRY_DEFAULT')); $paypal_countries = array('ES', 'FR', 'PL', 'IT'); if (Context::getContext()->getMobileDevice() && Context::getContext()->shop->getTheme() == 'default' && in_array($iso_code, $paypal_countries)) $paypal_condition = ' AND m.`name` = \'paypal\''; And this $paypal_condition is appended to the available payment methods query, thus if you are in ES,FR,PL or IT browse with a mobile and use the default theme you'll only see paypal payment method. You can see this condition in the file https://github.com/PrestaShop/PrestaShop/blob/master/classes/module/Module.php in newer versions inside the getPaypalIgnore method and in older ones directly in getPaymentModules In order to get rid of this condition you should write overide this class uploading the following code to a new file in /overide/classes/module/Module.php <?php class Module extends ModuleCore { public static function getPaypalIgnore() { return false; } } What I would like to know is if this behavior is really an error or if it is something intentional that Prestashop is doing to favor Paypal. Why should appear anything related to Paypal in the prestashop core files? Edited December 5, 2013 by ZhenIT Software (see edit history) Link to comment Share on other sites More sharing options...
benjamin utterback Posted December 3, 2013 Share Posted December 3, 2013 Hi ZhenIT, this was in the core because PayPal was the preferred online payment method for mobile devices, and still is by FAR. Thankfully, due to our open-source nature, you can easily change the code to allow other, less used, mobile payment solutions. Open Source FTW . This has been discussed before and thanks for sharing your code change. Always make sure to back up before you change any code! Read this blog post for more information How to Manually Back Up your PrestaShop Database and Files Link to comment Share on other sites More sharing options...
ZhenIT Software Posted December 5, 2013 Share Posted December 5, 2013 Thanks for your answer. You are right Open Source doens't mean unbiased, and it is open thus the solution is at hand, nothing to object. Link to comment Share on other sites More sharing options...
BJng Posted January 22, 2014 Share Posted January 22, 2014 Hi all, I installed mobile module on prestashop 1.4.7.0 everything works fine but the final checkout... always have the same problem " no payment module is available in your countryI tryed the solution you explain here but nothing.. same problem. Do I make some mistake? Thanks to all in advance Stefano Link to comment Share on other sites More sharing options...
genny3021 Posted October 4, 2014 Share Posted October 4, 2014 (edited) Hello Zhenti, benjamin, am using prestashop 1.5.6 and this fix dint work. I have cleared my cache, deleted my smarty compile files, renamed my class_index file all to no avail. After clicking "i confirm my order" on the payment validation page, it loads but nothing happens. On clicking again i get a white page. I have set debug mode to true in my defines.inc.php and no error message is logged My version of prestashop is 1.5.6. Please help. my site is live and i need to use the mobile theme. Thanks. Edited October 4, 2014 by genny3021 (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts