sourabh Posted January 9, 2018 Share Posted January 9, 2018 (edited) hello All, i am newbee to prestashop i want to develop an module to export orders in xml format when hit to URL any one can guide me or any sample module boilerplate?? Edited January 9, 2018 by sourabh (see edit history) Link to comment Share on other sites More sharing options...
selectshop.at Posted January 9, 2018 Share Posted January 9, 2018 You can use webservice api: http://doc.prestashop.com/display/PS16/Webservice+Parameters and http://doc.prestashop.com/display/PS16/Using+the+PrestaShop+Web+Service or you can develop a module: http://doc.prestashop.com/display/PS16/Developer+tutorials 1 Link to comment Share on other sites More sharing options...
phpist Posted January 9, 2018 Share Posted January 9, 2018 Hi @sourabh, What do you mean by "whrn I hit a specific url"? is that meaning when you get a url in the back end you want to start downloading that xml file? if so, you need to hook displayBackOfficeHeader hook and check for the url you want, if it's the right url then you can start your xml file procedures. I hope I answered you, let me know if I can help out Cheers Link to comment Share on other sites More sharing options...
sourabh Posted January 10, 2018 Author Share Posted January 10, 2018 17 hours ago, phpist said: Hi @sourabh, What do you mean by "whrn I hit a specific url"? is that meaning when you get a url in the back end you want to start downloading that xml file? if so, you need to hook displayBackOfficeHeader hook and check for the url you want, if it's the right url then you can start your xml file procedures. I hope I answered you, let me know if I can help out Cheers first thank you for your reply so quickly..actually i want create a module which will return xml response when i call a url with some specific parameters Link to comment Share on other sites More sharing options...
selectshop.at Posted January 10, 2018 Share Posted January 10, 2018 As I told before: for XML call best is to use webservice. Try out the links I added before. Link to comment Share on other sites More sharing options...
sourabh Posted January 10, 2018 Author Share Posted January 10, 2018 but how i can create custom web services in module? Link to comment Share on other sites More sharing options...
selectshop.at Posted January 10, 2018 Share Posted January 10, 2018 You don't need a module. Activate the webservice on back-office. Only a script is needed to import/export than data. https://www.google.at/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0ahUKEwiP-IWAm83YAhVN_aQKHe93DRAQFgguMAA&url=http%3A%2F%2Fdoc.prestashop.com%2Fdownload%2Fattachments%2F720902%2FCRUD%20Tutorial%20EN.pdf&usg=AOvVaw379ckEH40rs22mRf3tKNCj http://doc.prestashop.com/display/PS16/Web+service+tutorial Link to comment Share on other sites More sharing options...
sourabh Posted January 10, 2018 Author Share Posted January 10, 2018 Actually we need xml response in different format and this module will be work as medium between presta shops and our application. when we hit endpoint of any store url that will give response of xml in expected format is that possible we can create custom web service through module in presta 1.7 ? really thank you for your support Link to comment Share on other sites More sharing options...
phpist Posted January 10, 2018 Share Posted January 10, 2018 I see what you're looking for @sourabh I don't think a webservice is needed in this case. What you need is to create a front controller that will have this business of creating the xml and displaying as you like, you can then provide the link of this controller of your module to be accessed by your application. That simple Link to comment Share on other sites More sharing options...
sourabh Posted January 11, 2018 Author Share Posted January 11, 2018 thank you all Link to comment Share on other sites More sharing options...
phpist Posted January 11, 2018 Share Posted January 11, 2018 If my answer was right for you, would you please mark it as solved Thanks 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now