Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Having problem with filters in catalog_product.list
 
dops
Jr. Member
 
Total Posts:  12
Joined:  2009-04-06
 

Hello out there,

I´m trying to get some product data out of magento via product api. But I simply can´t get the filter running. I only want to have configurable products. This is the code:

$filter = array('type' => array('like' => 'configurable'));
$products $mgt_soap_client->call($mgt_soap_session'catalog_product.list'$filter);

I´ve tried also some variations like “type_id” instead of “type” and “=” instead of “like”. But everything I get is a fatal error because of an uncaught SoapFault exeption.

Fatal errorUncaught SoapFault exception[0] Unknown Error in ...

Without setting the filter I´m getting all products.

Can anybody please tell me what I´m doing wrong?

Greets
dops

 
Magento Community Magento Community
Magento Community
Magento Community
 
rteague612
Member
 
Avatar
Total Posts:  48
Joined:  2008-07-29
 

instead of

$products $mgt_soap_client->call($mgt_soap_session'catalog_product.list'$filter);

try:

$products $mgt_soap_client->call($mgt_soap_session'catalog_product.list', array($filter));
 
Magento Community Magento Community
Magento Community
Magento Community
 
dops
Jr. Member
 
Total Posts:  12
Joined:  2009-04-06
 

That works fine!!!

Thank you very much!

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top