简体   繁体   中英

Prestashop webservice API didn't work

I has been installed pastershop version prestashop_1.5.4.1. My site is host on localhost like "localhost/myprestashop" . When I read documentation that calling prestashop webservice, it's pretty easy. But, when I call like that "localhost/myprestashop/api" , it's didn't work. I didn't see any xml result. I see "Not Found" Message at below.

在此处输入图像描述

I already enabled webservice and generate key. But, it's didn't work. Please point out me what kinds of problem in here. Webservice generate image is here.

在此处输入图像描述

Test this urls in your browser:

http://keyapi@localhost/api/customers ==> Replace keyapi string for your key api.

or

http://localhost/myprestashop/i/categories/5

Regards

You need to enable the url rewrite on your hosting and on your PrestaShop (in your SEO tab). That should solve your problem.

请尝试以下操作您需要传递密钥,如我们的文档中所解释的localhost / yourshop.com / api /?ws_key = YOUR_KEY

检查是否在Advance Parameters-> Webservice下启用了Webservice,然后在配置部分下启用。

This is an issue related to the rewrite module of the apache. Check if you have this module installed. Once you check this, you have to modify your configuration file of Apache (httpd in Windows, apache2.conf in Ubuntu) and replace the AllowOverride properties like this:

<directory />
Options All
AllowOverride All /*Put All instead of None*/
</directory>

<directory /directory/of/localhost>
Options All
AllowOverride All /*Put All instead of None*/
</directory>

Restart the Apache service and it should work.

There are several step to you have check,

  1. check the rewrite_module enable, if it is disabled enable it. you can check whether the module is enabled or not run this code creating a PHP file
<?php print_r(apache_get_modules()); ?>

if you got more details without error, it seems already enabled

  1. if you using existing project, Go to Prestashop and again create new another key and try again,

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM