knowzero
knowzero

Reputation: 78

Magento API catalog_product.info get all products

I want to get info about all product info from all products using catalog_product.info. So i tired excluding the product id argument from the catalog_product.info call

$result = $client->call($session, 'catalog_product.info');

That didn't work

so i tired to filter like in the catalog_product.list call for all simple products

$productId =array('type' => array('is' => 'simple'));
$result = $client->call($session, 'catalog_product.info', $productId);

i got an error "SQLSTATE[HY093]: Invalid parameter number: parameter was not defined"

So my questions is 1) Can catalog_product.info get all products? 2) Can we filter catalog_product.info for simple products only

Upvotes: 0

Views: 1020

Answers (1)

kuba_ceg
kuba_ceg

Reputation: 930

1) No, catalog_product.info allows retrieve information only about the required product,

2) Yes, You can filter all simple products but with catalog_product.list method:

$params = array(array(
        'type' =>
          array(
            'in' => 'simple'
               )
          ));



$result = $client->call($session, 'catalog_product.list', $params);

Upvotes: 1

Related Questions