Jump to content

What is v1.5 api url? - Please Help


Recommended Posts

  • 3 weeks later...

I guess .. I figured it out ... For some reason the api folder is designed to not exist. I am guessing its for security reasons. Instead using the .htaccess file, the url is redirected to webservices subfolder in your store specifically to dispatcher.php in that folder. This is where the actual code for webservice exists. Atleast the dispatching part of the code. So dont worry API folder does not exist.

 

Now to solve this problem. I figured out what was happening when the same files was working on one hosting provider and not on another. webservices for 1.5.2 was working on site5 hosting but not on hostgator and my localhost.

I had 2 issues. you problem could be one of these or both. Firstly your hosting should enable mod_rewrite. You will have to contact your hosting provider to enable that. On localhost you will have to set it in your php apache. I had this problem on the hostgator account. I did this and it started working

 

On my localhost, I checked and found out that mod_rewrite was enabled but I still cannot access webservice. I am using lampp on ubuntu 12.04. All the command for url rewriting is chalked out in a file called .htaccess in your store main folder. This file was missing on my localhost store folder. This was because ubuntu was not allowing prestashop to create or modify this file. So what I did was create a blank .htacess file and using chmod set the permissions of that file to 666.

 

In prestashop 1.4 .htaccess can be manually generated. In prestashop 1.5 it is automatically generated. But you need to trigger prestashop to update the .htaccess file. So what I did was go to preference and enable friendly url. saved settings and then disabled friendly url. Now when I check back at the .htaccess file it is no longer blank, prestashop has written something in it. I checked webservices and it worked.

 

Hope this was useful ...

Edited by alexjv89 (see edit history)
  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...