magento - 在多商店 View 中使用 Magento rest API

标签 magento rest magento-1.7

我有一个 Magento 网站,在 3 个不同的商店 View 中提供 3 种语言。我需要通过rest API检索产品信息,访问这个地址:

http://-mysite-/api/rest/products

它工作得很好,但我只从默认商店 View 接收数据。在我的 webapp 中,我需要切换语言,我需要访问其他商店 View 。我阅读了文档( http://www.magentocommerce.com/api/rest/introduction.html ),但我找不到关于商店 View 和多语言网站的任何信息......我尝试在标题中传递语言或将 store_id 作为“获取变量”传递......没有,它只适用于默认商店 View 。任何的想法?

最佳答案

你可以试试这个。 magentomysite/api/rest/products/store/storeid 。例如,您可以将其用作 magentomysite/api/rest/products/store/1 用于英文商店产品。

记住一件事。在管理面板中,您还必须向 guest 用户授予权限。那么只有你才能通过这个url获取数据。

我希望这对你有帮助。

关于magento - 在多商店 View 中使用 Magento rest API,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16812859/

相关文章:

c# - SOAP 到 REST 的转换

java - RESTeasy ContainerRequestFilter 永远不会被调用

php - Magento列表按属性排序按属性顺序而不是值排序

linux - Magento:有趣的网址

ios - 如何生成 Google Place API session token ?

magento-1.7 - 尝试复制产品时 Magento 出错

magento 模块复制到 include/src

php - magento 下的 sslv3 警报握手失败

Magento,填充管理编辑表单上的复选框字段

mysql - Magento - 将 magento 从 1.6.2 更新到 1.7.0.2