Ruby on rails MagentoAPI:从类别中获取产品
嗨,我在任何地方都找不到如何在MagentoAPI中按类别id获取产品列表。我正在使用RubyXMLRPC库。当我调用product.list时,我得到了我所有的产品,每个产品都是这样的:Ruby on rails MagentoAPI:从类别中获取产品,ruby-on-rails,ruby,magento,ruby-on-rails-3.1,Ruby On Rails,Ruby,Magento,Ruby On Rails 3.1,嗨,我在任何地方都找不到如何在MagentoAPI中按类别id获取产品列表。我正在使用RubyXMLRPC库。当我调用product.list时,我得到了我所有的产品,每个产品都是这样的: {"product_id"=>"165", "sku"=>"mycomputer", "name"=>"My Computer", "set"=>"39", "type"=>"bundle", "category_ids"=>["27"]}, {"product_id
{"product_id"=>"165", "sku"=>"mycomputer",
"name"=>"My Computer", "set"=>"39",
"type"=>"bundle", "category_ids"=>["27"]},
{"product_id"=>"166", "sku"=>"HTC Touch Diamond", "name"=>"HTC Touch Diamond",
"set"=>"38", "type"=>"simple", "category_ids"=>["8"]}
client.call('call',session\u id,'product.list')
为我提供了每一种产品。
我尝试了client.call('call',session_id,'product.list',[:name=>{:like=>“%%computer”}])
为我提供了名称包含计算机的产品。
我试过了
client.call('call',session_id,'product.list',[:category_ids=>{:include=>"8"}])
client.call('call',session_id,'product.list',[:category_ids=>"8"])
client.call('call',session_id,'product.list',[:category_ids=>["8"]])
所有这些都失败了。我甚至试着用“类别id”替换“类别id”
此外,以下行也不起作用。我做错了什么
client.call('call',session_id,'product.info',[:product_id=>xxx])
MagentoAPI和RubyXMLRPC API都不能告诉我正确的语法应该是什么。有人有其他建议吗?您需要使用API方法
从文件中:
检索指定产品的列表
返回:数组
论据:
int$categoryId-类别ID混合$store-store ID或代码
别名:
类别.指定产品
谢谢我认为你是对的。您是否也知道如何正确使用id调用product.info?