问题
How do I get all the details of multiple products in a single xml-rpc call.I have the SKU ids of 10 products. I am using the catalog_product.info to retrieve the details of a single product. But I am not able to pass multiple SKU ids or maybe I am doing it the wrong way. Making the same call 10 times takes a long time so that is definitely ruled out.
回答1:
You can use multiCall rather than 10 seperate XMLRPC calls. This is explained in the Magento wiki.
You could also use catalog_product.items and specify a filter of multiple ID's. But that option will only give you basic product information (no things like prices, descriptions, etc).
If even multiCall is too slow, you will probably need to write a module that exposes a product collection through your own API method.
来源:https://stackoverflow.com/questions/9414335/magento-getting-the-details-of-multiple-products-in-a-single-xml-rpc-call