meccabooks Posted March 11, 2013 Share Posted March 11, 2013 We are working on developing a app for android and iOS, it will be a Reader app, where customers can purchase e-books on our website and when they login using the website credentials in the app, there purchases of ebooks will be available on the app, where they can open them ans read them. App will be connected to the DB of the website, we are able to use webservices, to connect to the db, validate cusotmer info and orders etc, however we are unable to figure out how can we triger the download of the e-books files from the "Download" folder in the website to the app, once the purchase has been verified. We have some way arounds, however I would like the files to be pushed to the app from the "download" folder without any modification. It will be done for both Android and iOS apps... Link to comment Share on other sites More sharing options...
RaPhiuS Posted March 11, 2013 Share Posted March 11, 2013 (edited) Hello, This is an interesting development you are on ;-) If I had to implement what you are after I would think using the actionPaymentConfirmation hook available in Prestashop. I would develop a small module called for example "Fire Download To Client" which would register on this actionPaymentConfirmation hook and within the the HookActionPaymentConfirmation method I would implement the necessary commands to push the file download. This way you don't change anything to Prestashop, it's clean and will normally do what you want. Does that make sense? BR, RaPhiuS Edited March 11, 2013 by RaPhiuS (see edit history) Link to comment Share on other sites More sharing options...
meccabooks Posted March 12, 2013 Author Share Posted March 12, 2013 Hello, This is an interesting development you are on ;-) If I had to implement what you are after I would think using the actionPaymentConfirmation hook available in Prestashop. I would develop a small module called for example "Fire Download To Client" which would register on this actionPaymentConfirmation hook and within the the HookActionPaymentConfirmation method I would implement the necessary commands to push the file download. This way you don't change anything to Prestashop, it's clean and will normally do what you want. Does that make sense? BR, RaPhiuS So if I understand correctly, trigger to download the file to appropriate device will happen once the customer logins to the device.. and that will "Fire" the file to the device ready to download.. If this is something you can help in detail please PM me. Thanks, meccabooks Link to comment Share on other sites More sharing options...
RaPhiuS Posted March 13, 2013 Share Posted March 13, 2013 Hello, My explanation above was referring to hooking one module to the actionPaymentConfirmation. That means, whenever the customer is paying and the payment is confirmed, this hook will be called. Therefore, if you register your module with this hook then Prestashop, once payment is confirmed, will call all methods which are registered to it. You are also not limited only to this... Have a look here: http://doc.prestashop.com/display/PS15/Hooks+in+PrestaShop+1.5 If you don't find the hook in this list then you can always create a custom one and call it manually precisely where you would like it. Finally, you might be interested in the hook actionAuthentication or actionBeforeAuthentication which could carry the operation you are after. Just need some code and logic behind exactly what you are willing to do... Let me know if you need anything more. BR, RaPhiuS Link to comment Share on other sites More sharing options...
meccabooks Posted March 19, 2013 Author Share Posted March 19, 2013 Hello, My explanation above was referring to hooking one module to the actionPaymentConfirmation. That means, whenever the customer is paying and the payment is confirmed, this hook will be called. Therefore, if you register your module with this hook then Prestashop, once payment is confirmed, will call all methods which are registered to it. You are also not limited only to this... Have a look here: http://doc.prestasho...+PrestaShop+1.5 If you don't find the hook in this list then you can always create a custom one and call it manually precisely where you would like it. Finally, you might be interested in the hook actionAuthentication or actionBeforeAuthentication which could carry the operation you are after. Just need some code and logic behind exactly what you are willing to do... Let me know if you need anything more. BR, RaPhiuS Will you be able to help us in the development? Link to comment Share on other sites More sharing options...
RaPhiuS Posted March 19, 2013 Share Posted March 19, 2013 I can help you out on this development yes. Please PM me. Link to comment Share on other sites More sharing options...
meccabooks Posted May 22, 2013 Author Share Posted May 22, 2013 I can help you out on this development yes. Please PM me. Sent you PM Link to comment Share on other sites More sharing options...
Recommended Posts