0

所以我在下面有这段代码,它将成功地提取产品并为我的 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”字样的产品,但它不会......

4

1 回答 1

4

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

尝试使用“喜欢”...

http://mywebsite.com/api/rest/products?type=rest&filter[1][attribute]=name&filter[1][like]=%test%
于 2013-03-26T11:40:36.790 回答