简体   繁体   English

Magento API Rest过滤器

[英]Magento API Rest filters

So I have this piece of code below which will sucessfully pull a product and give the XML data for my magento store... 因此,我下面有这段代码可以成功提取产品并为我的magento商店提供XML数据...

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

However, it will ONLY pull up the product info if I make the product name perfect. 但是,如果我使产品名称完美,它只会拉出产品信息。 If I try to just put in 如果我尝试放入

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

It will not bring ANY products. 它不会带来任何产品。 It was my understanding that if I used the "[in]" filter that it should bring up all products containing the "test" word but it doesnt... 据我了解,如果我使用“ [in]”过滤器,它将显示所有包含“ test”字词的产品,但不会...

in - "equals any of" - returns items that are equal to the item(s) with the specified attribute(s) in-“等于”等于-返回等于具有指定属性的项目的项目

Try to use 'like' ... 尝试使用“喜欢” ...

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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