Product attributes API
Table of Contents
Allows to get list of product attributes
Module: Mage_Catalog
Resource: catalog_product_attribute
Aliases:
- product_attribute
Methods |
catalog_product_attribute.currentStore |
Set/Get current store view
Return: int
Arguments:
- mixed storeView - store view id or code (optional)
Aliases:
- product_attribute.currentStore
catalog_product_attribute.list |
Retrieve attribute list
Return: array
Arguments:
- int setId - attribute set ID
Aliases:
- product_attribute.list
catalog_product_attribute.options |
Retrieve attribute options
Return: array
Arguments:
- mixed attributeId - attribute ID or code
- mixed storeView - store view ID or code (optional)
Aliases:
- product_attribute.options
Faults |
| Fault Code | Fault Message |
|---|---|
| 100 | Requested store view not found. |
| 101 | Requested attribute not found. |
Examples |
Example 1. Getting product attribute's sets list and get attributes |
- $proxy = new SoapClient('http://magentohost/api/soap/?wsdl');
- $sessionId = $proxy->login('apiUser', 'apiKey');
- $attributeSets = $proxy->call($sessionId, 'product_attribute_set.list');
- var_dump($attributeSets);
- $set = current($attributeSets);
- $attributes = $proxy->call($sessionId, 'product_attribute.list', $set['set_id']);
- var_dump($attributes);
- $attribute_options = $proxy->call($sessionId, 'product_attribute.options', array('attribute_id'=>'put_attribute_id_as_int_here'));
- var_dump($attribute_options);


