Joseph Aristotil Posted December 27, 2012 Share Posted December 27, 2012 Hi there, We are using two sites one is Prestashop and another one is an ASP.NET based site. Now we want to communicate Prestashop from ASP.NET site to add customers, products, list products and much more, We found a solution that Prestashop have inbuilt Webservices. We are currently host the prestashop in IIS7. Now we need to configure the webservice in prestashop to communicate with ASP.NET site. Can anyone tell me the procedure to setup webservice of prestashop in IIS7? Thanks in advance... We are using, Prestashop 1.4.1 version IIS 7.0 in windows server 2008 ASP.NET 2.0 Framework Link to comment Share on other sites More sharing options...
suenda Posted December 27, 2012 Share Posted December 27, 2012 Never used IIS, but I guess webservice stuff is pretty generic thing across all webservers, be it apache or ngnix. I'd recommend you to go through microsoft site to see how you configure a particular apache configuration on IIS. You need to understand how webservices work on apache and find equivalent configuration on IIS. Or, why not have prestashop run on apache? Link to comment Share on other sites More sharing options...
bellini13 Posted December 27, 2012 Share Posted December 27, 2012 You need to enable webservices from the back office in the Tools | Webservice section. You should probably read through the usage guides in the resource menu to understand how to configure them. http://doc.prestashop.com/display/PS14/Using+the+REST+webservice Prestashop uses REST, you can read more about them here http://www.anterp.com/blog/?p=428 Basically, you will need to implement a REST interface from your ASP.net application Link to comment Share on other sites More sharing options...
Joseph Aristotil Posted December 28, 2012 Author Share Posted December 28, 2012 First of all thanks to suenda and bellini13 for reply. Now i configured the webservice of prestashop in IIS7. I've followed the steps to do this. In prestashop administration, goto tools -> webservice. In this page Under Configuration -> Enable <Your Store> Webservice to Yes, Click Save. Prestashop webservice can restricted access to end user, For this you need to create access key. To create an access key, In tools -> webservice page, Click Add new button under Breadcrumb. In the new key page, Click Generate to Generate new key. Then choose the options to be enabled for the new key. Then click save. You can edit the key permissions anytime after this. Now you can access the webservice by http://<Access_Key>@yourshop.com/webservice/dispatcher.php?url=<methods>, or http://<Access_Key>@yourcompany.com/yourshop/webservice/dispatcher.php?url=<method>. Here the first url says you hosted the prestasop in your own domain, and the second url says you hosted the prestashop in a virtual directory of your domain. Here the <Access_Key> means the key generated in tools -> webservice page, and <methods> means the prestashop CRUD methods. If you need to access the webservices by simple readable urls then, you can use URL rewrite methods. Then you need to setup IIS7. In IIS 7, Go to Default Website. In Right side panel make sure the URL rewrite available. If URL rewrite is not available in right side panel. Download URL Rewrite Module from Here and install it. After installation close and open the IIS Application. Now you can see URL rewrite when choose a website. Choose your website or virtual directory in left side tree view. Then Double Click on URL Rewrite in right side pane. Now you see URL Rewrite Interface. In Right side panel you can see a link under Inbound Rules named "Import Rules...". Click on Import Rules... link, This opens a import wizard. Download the attached .htaccess file Open downloaded .htaccess file and make changes as you wish. Copy all the content inside the modified .htacess file, and paste it into Rewrite Rules Under "Rules to Import" section. Now you can see the formatted rules under the converted rules section. Then Click Apply link in right side links pane. To apply the rewrite rules. Now you can access the webserives like http://<Access_Key>.yourstore.com/api/<Mehtods>, or http://<Access_Key>.yoursite.com/yourstore/api/<Methods>. Thanks once again to suenda and bellini13. sample.htaccess.txt 1 Link to comment Share on other sites More sharing options...
JasonRShaver Posted May 14, 2013 Share Posted May 14, 2013 Joseph, Thanks for take the time to write that out, that fixed everything perfectly (Windows Server 2012)! This really should be put into the docs. Jason Link to comment Share on other sites More sharing options...
Joseph Aristotil Posted May 15, 2013 Author Share Posted May 15, 2013 Thanks Jason Link to comment Share on other sites More sharing options...
panilo-lo Posted September 1, 2016 Share Posted September 1, 2016 First of all thanks to suenda and bellini13 for reply. Now i configured the webservice of prestashop in IIS7. I've followed the steps to do this. In prestashop administration, goto tools -> webservice. In this page Under Configuration -> Enable <Your Store> Webservice to Yes, Click Save. Prestashop webservice can restricted access to end user, For this you need to create access key. To create an access key, In tools -> webservice page, Click Add new button under Breadcrumb. In the new key page, Click Generate to Generate new key. Then choose the options to be enabled for the new key. Then click save. You can edit the key permissions anytime after this. prestashop CRUD methods. If you need to access the webservices by simple readable urls then, you can use URL rewrite methods. Then you need to setup IIS7. In IIS 7, Go to Default Website. In Right side panel make sure the URL rewrite available. If URL rewrite is not available in right side panel. Download URL Rewrite Module from Here and install it. After installation close and open the IIS Application. Now you can see URL rewrite when choose a website. Choose your website or virtual directory in left side tree view. Then Double Click on URL Rewrite in right side pane. Now you see URL Rewrite Interface. In Right side panel you can see a link under Inbound Rules named "Import Rules...". Click on Import Rules... link, This opens a import wizard. Download the attached .htaccess file Open downloaded .htaccess file and make changes as you wish. Copy all the content inside the modified .htacess file, and paste it into Rewrite Rules Under "Rules to Import" section. Now you can see the formatted rules under the converted rules section. Then Click Apply link in right side links pane. To apply the rewrite rules. Thanks once again to suenda and bellini13. Very good explaination! It must be in docs... Thanks for your time man! 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