【问题标题】:Magento API Rest filtersMagento API Rest 过滤器
【发布时间】:2013-03-26 19:40:36
【问题描述】:

所以我在下面有这段代码,它将成功提取产品并为我的 magento 商店提供 XML 数据...

http://mywebsite.com/api/rest/products?type=rest&filter[1][attribute]=name&filter[1][in]=test%20product%20name

但是,如果我使产品名称完美,它只会拉出产品信息。如果我尝试放入

http://mywebsite.com/api/rest/products?type=rest&filter[1][attribute]=name&filter[1][in]=test

它不会带来任何产品。我的理解是,如果我使用“[in]”过滤器,它应该会显示所有包含“test”字样的产品,但它不会......

【问题讨论】:

    标签: api magento rest


    【解决方案1】:

    in - "equals any of" - 返回与具有指定属性的项目相等的项目

    尝试使用“喜欢”...

    http://mywebsite.com/api/rest/products?type=rest&filter[1][attribute]=name&filter[1][like]=%test%
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-10-12
      • 1970-01-01
      • 2018-01-28
      • 2022-01-26
      • 2018-05-08
      • 1970-01-01
      相关资源
      最近更新 更多