m openmage

OpenMage LTS Developer Documentation

Category Attributes

Edit this page on GitHub

Module: Mage_Catalog

The Mage_Catalog module allows you to manage categories and products.

Category Attributes

Allows you to retrieve the list of category attributes and options.

Resource Name: catalog_category_attribute

Aliases:

Methods:

Faults

Fault Code Fault Message
100 Requested store view not found.
101 Requested attribute not found.

Examples

Example 1. Retrieving attributes and options
$proxy = new SoapClient('http://magentohost/api/soap/?wsdl');
$sessionId = $proxy->login('apiUser', 'apiKey');
$attributes = $proxy->call($sessionId, 'category_attribute.list');
foreach ($attributes as &$attribute) {
   if (isset($attribute['type'])
       && ($attribute['type'] == 'select' || $attribute['type'] == 'multiselect')) {
       $attribute['options'] = $proxy->call($sessionId, 'category_attribute.options', $attribute['code']);
   }
}
var_dump($attributes);