Call-back icon  Sales: Call 800.374.8146 (N America)|757.278.0920 (International)

Magento

Open Source eCommerce Evolved

Category attributes API

Last modified by Michael on Fri, July 4, 2008 13:23
Source|Old Revisions  

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

  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);



 

Popular Wiki Tags  |  View all

 observer   model   clienti magazin   pdf   video   image   upload   CRM   vtiger   diagram   schema   CGI   registration   installation guide   cron 

Professional Services from the Magento Team

Professional Installation from the Magento Team

Magento Job Board - Some sort of tag line goes here

Latest Posts| View all Jobs
Sales: Call 800.374.8146 (North America) 757.278.0920 (International)
© Copyright 2008 Varien. Magento is a trademark of Irubin Consulting Inc. DBA Varien
Privacy Policy|Terms of Service
Magento Community Count
33685 users|389 users currently online|74663 forum posts