0

I'm trying to making API calls from my other website to my magento store. If possible, I would like to get a list of products (specified by SKU) and their name/url/image_url in just one call.

Currently I find no way of doing it. The product list only gives me product name. I have to make an api call for each product to get their url/image_url. That's so not efficient. Any better way of doing this?

Running Magento 1.9.1. Thanks.

0

I finally found a solution, using multiCall:

$methods = array();
foreach($skus as $value){
    $methods[] = array('catalog_product.info',array($value,NULL,array('name','url_path'),'sku'));
    $methods[] = array('catalog_product_attribute_media.list',array($value,NULL,'sku'));
}
$result = $client->multiCall($session, $methods);
  • Hi @Shawn please help me to define $skus I can't understand what I need to put in $skus variable . I am new in magento – Sanchit1234 Aug 25 '15 at 14:04
  • It's an array of product's sku numbers. – Shawn Aug 26 '15 at 16:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.