简体   繁体   中英

Get all categories by store with SOAP Magento

I can see in Magento docs that categories.tree can be called with an optional store view parameter, but I can't make it work.

I am doing the following:

$store = 'gl'; // This is my store view code
return self::$client->call( self::$session, 'catalog_category.tree' , $store );

But I get a SOAP error. How showld I do it?

Thanks

$client->call(self::$session, 'catalog_category.tree' , null, $store );

You are not passing the second parameter, that ( as per documentation ) corresponds to the parentId, and I think that you want to ignore it.

The equivalent call for the SOAPv2 API would be:

$client->catalogCategoryTree(self::$session, null, $store);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM