Table of Contents

Allows to get attributes and options for category.

Module: Mage_Catalog

Resource: catalog_category_attribute

Aliases:

Methods

catalog_category_attribute.currentStore

Set/Get current store view

Return: int

Arguments:

Aliases:

catalog_category_attribute.list

Retrieve category attributes

Return: array

Aliases:

catalog_category_attribute.options

Retrieve attribute options

Arguments:

Aliases:

Faults

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

Examples

Example 1. Retrieving attributes and options

  1. $proxy = new SoapClient('http://magentohost/api/soap/?wsdl');
  2. $sessionId = $proxy->login('apiUser', 'apiKey');
  3. $attributes = $proxy->call($sessionId, 'category_attribute.list');
  4. foreach ($attributes as &$attribute) {
  5.    if (isset($attribute['type'])
  6.        && ($attribute['type'] == 'select' || $attribute['type'] == 'multiselect')) {
  7.        $attribute['options'] = $proxy->call($sessionId, 'category_attribute.options', $attribute['code']);
  8.    }
  9. }
  10. var_dump($attributes);