m openmage

OpenMage LTS Developer Documentation

Attribute Types

Edit this page on GitHub

Module: Product Attributes API

Resource: product_attribute

Method:

Allows you to retrieve the list of possible attribute types.

Arguments:

Type Name Description
string sessionId Session ID

Return:

Type Name Description
array result Array of catalogAttributeOptionEntity

The catalogAttributeOptionEntity content is as follows:

Type Name Description
string label Option label
string
value
Option value

Faults:

No Faults.

Examples

Request Example SOAP V1
$proxy = new SoapClient('http://magentohost/api/soap/?wsdl');
$sessionId = $proxy->login('apiUser', 'apiKey');

$result = $proxy->call(
    $sessionId,
    "product_attribute.types"
);

echo "<pre>";
var_dump($result);
Request Example SOAP V2
$proxy = new SoapClient('http://magentohost/api/v2_soap/?wsdl'); // TODO : change url
$sessionId = $proxy->login('apiUser', 'apiKey'); // TODO : change login and pwd if necessary

$result = $proxy->catalogProductAttributeTypes($sessionId);
var_dump($result);
Response Example SOAP V1
array
  0 =>
      'value' => 'text'
      'label' => 'Text Field'
  1 =>
      'value' => 'textarea'
      'label' => 'Text Area'
  2 =>
      'value' => 'date'
      'label' => 'Date'
  3 =>
      'value' => 'boolean'
      'label' => 'Yes/No'
  4 =>
      'value' => 'multiselect'
      'label' => 'Multiple Select'
  5 =>
      'value' => 'select'
      'label' => 'Dropdown'
  6 =>
      'value' => 'price'
      'label' => 'Price'
  7 =>
      'value' => 'media_image'
      'label' => 'Media Image'
Create the Magento file system owner