====== Category attributes API ====== Allows to get attributes and options for category. **Module: ** Mage_Catalog **Resource:** catalog_category_attribute **Aliases:** * category_attribute ===== Methods ===== ==== catalog_category_attribute.currentStore ==== Set/Get current store view **Return:** int **Arguments:** * mixed storeView - Store view ID or code. (optional) **Aliases:** * category_attribute.currentStore ====== ==== catalog_category_attribute.list ==== Retrieve category attributes **Return:** array **Aliases:** * category_attribute.list ====== ==== catalog_category_attribute.options ==== Retrieve attribute options **Arguments:** * attributeId - attribute id or code * storeView - store view id or code **Aliases:** * category_attribute.options ====== ===== 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);