Product attributes API

Last modified by Michael on Fri, July 4, 2008 12:29
Source|Old Revisions  

This is an old revision of the document!


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

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

  1. $proxy = new SoapClient('http://magentohost/api/soap/?wsdl');
  2. $sessionId = $proxy->login('apiUser', 'apiKey');
  3. $attributeSets = $proxy->call($sessionId, 'product_attribute_set.list');
  4.  
  5. var_dump($attributeSets);
  6.  
  7. $set = current($attributeSets);
  8.  
  9. $attributes = $proxy->call($sessionId, 'product_attribute.list', $set['set_id']);
  10.  
  11. var_dump($attributes);



 

Magento 2 GitHub Repository

Magento Job Board - Some sort of tag line goes here

Latest Posts| View all Jobs