wolfib Posted January 4, 2013 Share Posted January 4, 2013 Hi, I'm working on a project for a pizza delivery service. They want a mobile version of their website. The default mobile theme is perfect, except that the only compatible payment module is Paypal. The trouble is that I want to use the "pay on delivery" module. Can someone tell me what code to add to any payment module to make it compatible to the mobile device theme ? I've posted a topic on the forge, but the only reply of the Presta team is "only the Paypal module is compatible at the moment"... Thanks ! Wolfib Link to comment Share on other sites More sharing options...
Site Posted January 4, 2013 Share Posted January 4, 2013 I believe you would need to code the "pay on delivery" module into the mobile theme Unless there is a module on the add-ons store to do this Link to comment Share on other sites More sharing options...
wolfib Posted January 4, 2013 Author Share Posted January 4, 2013 I believe you would need to code the "pay on delivery" module into the mobile theme Unless there is a module on the add-ons store to do this Hi, What do you mean by "need to code the pay on delivery module into the mobile theme" ? In fact, the real name of the module that need to be modifed is "cash on delivery" which is a module included in the pack. Thanks anyway ! Link to comment Share on other sites More sharing options...
wolfib Posted January 10, 2013 Author Share Posted January 10, 2013 Me again. I tried to make the cash on delivery module by hacking the paypal module but it still doesn't work. Here's what I've done. First I put in modules/paypal/views/templates/front/express_checkout/paypal.tpl the content of modules/cashondelivery/views/templates/hook/payment.tpl. Because if I don't, I have no choice except paypal on the payment page. Didn't find what code to add on the cashondelivery module to show it... It works fine on the non-mobile version because it redirects to http://www.myshop.tld/index.php?fc=module&module=cashondelivery&controller=validation and I can complete my order. But on the mobile version, I only have a message "undefined" on the top of the page. Can't do more... I posted a message on the forge (http://forge.prestashop.com/browse/PSCFV-6223) but no answer. And I think it's quite ridiculous to communicate about the great mobile version of Prestashop on blogs and newsletter if users can only pay with Paypal. I have clients that just accept cheques only or that have their bank payment solution. So the mobile theme seems just useless... And as there is to documentation or communication from Prestashop, where can I find any answer ??? Thanks to any answer ! Link to comment Share on other sites More sharing options...
Dashe Posted July 21, 2013 Share Posted July 21, 2013 Do you have find a solution? I've have similar problem. I'd like to add another kind of payment on mobile versione Link to comment Share on other sites More sharing options...
wolfib Posted July 22, 2013 Author Share Posted July 22, 2013 Hi, No resolution yet. I posted a topic in the forge (http://forge.prestashop.com/browse/PSCFV-6223). Tried fastely the solution of mitesh but it didn't work. I didn't have enough time to test it deeply. If you find something that works, let us know. Link to comment Share on other sites More sharing options...
blackmiles Posted December 14, 2013 Share Posted December 14, 2013 (edited) Dear all! I've have the same problem, to show cash on delivery on the mobile version (or instead I have to remove the mobile version, sob). No possibility at all, by working on the code as well? Dear Site, which is the module on the add-ons store ou were talking about? Many thanks!! Stefano Edited December 14, 2013 by blackmiles (see edit history) Link to comment Share on other sites More sharing options...
fiddler1 Posted December 15, 2013 Share Posted December 15, 2013 (edited) I've been tinkering with this too. I almost have COD working on the mobile theme. But I still have a problem because you must press the "submit order" button twice before the order is sent and the page switches. I think these are the main items needed to get COD (almost) working on mobile theme: 1. copy order.confirmation.tpl into the mobile directory 2. copy history.tpl into mobile directory 3. make sure COD works with your standard theme first. If it doesn't see one possible fix here: http://www.prestashop.com/forums/topic/293437-cash-on-delivery-cod-04-not-working/ Now to figure out why we must push the button twice. Any ideas? My store is under development at http://www.donleyviolins.net/shopping.. Well, now it seems to be working with just one push of the button. Maybe it was just some junk in the cache. Edited December 15, 2013 by fiddler1 (see edit history) Link to comment Share on other sites More sharing options...
blackmiles Posted December 16, 2013 Share Posted December 16, 2013 Dear fiddler1, I tried as you said, but it doesn't work. That is, it is still working on the web but not on the mobile version. Where did I get wrong? Stefano Link to comment Share on other sites More sharing options...
fiddler1 Posted December 16, 2013 Share Posted December 16, 2013 Stefano, what exactly is the trouble you have with the payment on mobile? Maybe we can look at your site? Is the module showing on your payment page and it doesn't work, or is there no module on the payment page? My modules always showed on payment page - no problem there, they just didn't work. I still have one problem with the modules COD and Authorize.net - they both bypass order.confirmation and go straight to history, but that happens on both mobile and regular theme. I'll start another thread about that one. Cheers, - Tim Link to comment Share on other sites More sharing options...
blackmiles Posted December 16, 2013 Share Posted December 16, 2013 Hi Tim, it is the second case. By now I have only COD as a modality of payment, the module pre-installed in PS 1.5.6.1 The payment is visible in desktop modality but it doesn't appear in mobile modality. I think it is not present the template. Is there a solution to include a COD for mobile? I also created a payment with the universal payment module, but still it doesn't appear on mobile. Should do I have to activate something? Thanks Stefano Link to comment Share on other sites More sharing options...
fiddler1 Posted December 16, 2013 Share Posted December 16, 2013 (edited) Well, Stefano, I don't know. I never had the trouble with the modules not appearing at all. They appeared for me but did not work. I tried switching back to the default theme and they still appeared for me. You may have already done so, but you might want to check this: - you have module templates installed in your theme directory (not needed in mobile theme directory, but I think they must be in base theme directory for mobile to work) - permissions set correctly for module files TPl files 644 and directories 755 - you have order-payment.tpl and order-opc-payment.tpl installed in /yourtheme/mobile/ These files are in the default mobile theme for 1.5.6.1 - I added order-confirmation.tpl to the mobile directory, but don't think this would fix your problem by itself. I don't mind posting particular files from my system if you think it would help. I tried to make guest checkout work, but I gave up on that. - I am using 1-step checkout (quickorder) I don't know if 5-step works with mobile or not. Is your site online where we could have a look at it, and maybe someone will have some ideas? Buona fortuna! - Tim Edited December 16, 2013 by fiddler1 (see edit history) Link to comment Share on other sites More sharing options...
blackmiles Posted December 16, 2013 Share Posted December 16, 2013 Hi Tim, I am working with the default theme. Here the answer to your questions: - you have module templates installed in your theme directory (not needed in mobile theme directory, but I think they must be in base theme directory for mobile to work) yes - permissions set correctly for module files TPl files 644 and directories 755 yes - you have order-payment.tpl and order-opc-payment.tpl installed in /yourtheme/mobile/ These files are in the default mobile theme for 1.5.6.1 yes - Is your site online where we could have a look at it, and maybe someone will have some ideas? this is the site www.andfood.it Thanks so much!! Stefano Link to comment Share on other sites More sharing options...
fiddler1 Posted December 16, 2013 Share Posted December 16, 2013 I don't have a solution for you, Stefano, but here are some observations, clues perhaps that might help us figure this out. Your site is not running with SSL. Could that make a difference? I also see it is functioning a little differently from mine, and I don't understand why. Here's what I mean: This is the POST request which should cause the final checkout screen with payment modules to show. On andfood.it mobile: --[16:12:20.369] POST http://www.andfood.it/index.php?controller=order&multi-shipping= [HTTP/1.1 200 OK 912ms] And on donleyviolins.net/shopping mobile: [16:42:14.464] POST https://www.donleyviolins.net/shopping/order?multi-shipping= [HTTP/1.1 200 OK 4856ms] So my site, which is pulling up the mobile payment modules, is working differently. If anyone knows why, please tell us, and maybe it will help us figure this out! I don't know if this will help or not, but I hope so! Link to comment Share on other sites More sharing options...
Dh42 Posted December 17, 2013 Share Posted December 17, 2013 Are you using the Prestashop mobile theme? Link to comment Share on other sites More sharing options...
blackmiles Posted December 17, 2013 Share Posted December 17, 2013 Dear Dh42, if you are asking to me, i'm using the default theme, so the mobile section is the default one. Thanks! Stefano Link to comment Share on other sites More sharing options...
fiddler1 Posted December 17, 2013 Share Posted December 17, 2013 I understand now why Stefano and I have differences in the URL for the order page. Donleyviolins.net is using search-engine-friendly URL in the back office, but andfood.it has friendly URL turned off. But I switched donleyviolins.net over to default theme, 5-step order, and not-friendly URL. This makes it as much like andfood.it as possible. So my network request for the last order page becomes: [09:55:38.850] POST https://www.donleyviolins.net/shopping/index.php?controller=order&multi-shipping= [HTTP/1.1 200 OK 2845ms] but still I get my payment modules with no problem. I have the brow.si module active, so donleyviolins makes a GET request from js.brow.si but I don't think this would matter with Stefano's problem. So here's a couple ideas for Stefano and maybe others that don't have the payment modules on mobile: Everybody says it should work with PayPal, and I have PayPal USA/Canada installed. So why not install PayPal module and see if it works? Is there a PayPal Europe module? You can always deactivate it later. Also it's possible that there is some file that requires SSL to be active for the payment module to come up on mobile. So maybe if you have SSL certificate, you can check "enable SSL" on back office Preferences > General and see if it works. Probably customers would be happy to have their address and order details handled over SSL even with no credit card. If I think of something else I will post, but not sure what the problem could be for Stefano. Anyone else have ideas? Cheers, - Tim Link to comment Share on other sites More sharing options...
blackmiles Posted December 17, 2013 Share Posted December 17, 2013 Hi Tim, if I try to active SSL the server answers in this way: Secure Connection FailedAn error occurred during a connection to www.andfood.it. SSL received a record that exceeded the maximum permissible length. (Error code: ssl_error_rx_record_too_long) Any idea what is the problem. Should I have to contact the hosting? Maybe this is the problem.. Now I try to make the paypal thing. Thanks! Stefano Link to comment Share on other sites More sharing options...
blackmiles Posted December 17, 2013 Share Posted December 17, 2013 Ah. I discovered that my account on the hosting doesn't support SSL certificate. Maybe it is this the reason. Anyway I try with paypal as you suggested me. Stefano Link to comment Share on other sites More sharing options...
blackmiles Posted December 17, 2013 Share Posted December 17, 2013 (edited) Paypal works, but for instance bank transer does not work as well. Is it a problem concerning SSL or something else? Any idea? Thanks Stefano Edited December 17, 2013 by blackmiles (see edit history) Link to comment Share on other sites More sharing options...
Dh42 Posted December 17, 2013 Share Posted December 17, 2013 The mobile theme is programmed only so that paypal will work. Link to comment Share on other sites More sharing options...
fiddler1 Posted December 17, 2013 Share Posted December 17, 2013 (edited) So I've heard, but somehow I have it working quite well. My payment modules have always appeared in the mobile theme. I had to do a lot of work to the AuthorizeAim module to make it display correctly in mobile, but everything else has worked fine for me. So we're trying to figure out why it works for me but not for Stefano. Could the SSL be his problem? In which file do we find the code that makes this only work with Paypal? Edited December 17, 2013 by fiddler1 (see edit history) Link to comment Share on other sites More sharing options...
Dh42 Posted December 17, 2013 Share Posted December 17, 2013 I could totally be the theme version. I don't remember what line it is on the theme, but if you search paypal in the mobile theme you should be able to find it. Link to comment Share on other sites More sharing options...
fiddler1 Posted December 18, 2013 Share Posted December 18, 2013 Thanks Dh42! So maybe this will help you, Stefano: http://www.prestashop.com/forums/topic/217722-mobile-theme-do-not-display-custom-payment-modules/?do=findComment&comment=1479906 ZhenIT describes the file classes/module/Module.php and describes a fix. Prestashop is hard-coded to only display PayPal in Italy and some other European nations on the default mobile theme! So maybe it worked for me because I'm in the USA. But I think you can use the information from that discussion to get your payment modules working. If your online shop only sells to local customers in Italy, it may be that your payment module will work just by removing IT from the list in Module.php. It seems the SSL probably doesn't matter for this, but maybe it's a good idea anyway. Ciao, - Tim 1 Link to comment Share on other sites More sharing options...
blackmiles Posted December 18, 2013 Share Posted December 18, 2013 Dear Tim, it is the solution!!! Thank you so much!!!!! I will write it in another post I opened as well, for others that have the same problem. Thank you so much to all, really!!! Stefano Link to comment Share on other sites More sharing options...
blackmiles Posted December 18, 2013 Share Posted December 18, 2013 Should we have to put [sOLVED] this topic as well? I didn't open it, so I don't know it is solved for all participants. Bye Stefano Link to comment Share on other sites More sharing options...
Edkroket Posted March 17, 2014 Share Posted March 17, 2014 So i use also the default theme with mobile version. Also at checkout I get error 200. I try to understand and change files so my payment solution works on mobile devices as well. I'm using MultiSafepay which work fine in desktop view. I would pretty handy in editing files or whatsoever. Thanks in advance. Ed Link to comment Share on other sites More sharing options...
Recommended Posts