こんにちは私はMagento APIのカテゴリIDで商品のリストを取得する方法はどこにも見つかりません。私はRuby XMLRPCライブラリを使用しています。私はproduct.listを呼び出すと、私はすべての製品を取得し、それらの一つ一つは、このようなものです:Magento API:カテゴリから商品を取得
{"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_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"]])
を試してみました。私も "category_ids"を "category_id"に置き換えようとしました。
また、次の行も機能しません。私は何を間違えたのですか?
client.call('call',session_id,'product.info',[:product_id=>xxx])
Magento APIとRuby XMLRPC APIのどちらも、正しい構文がどのようなものであるかを教えてくれません。誰にも他の提案がありますか?
ありがとう。私はあなたが正しいと思います。あなたはidを使ってproduct.infoを正しく呼び出す方法も知っていますか? – benzhang