2011-12-20 17 views
4

Magento webservice APIのドキュメント内を検索しましたが、特定の製品のバリアント/オプションを取得するオプションが見つかりませんでした。たとえば、私は靴を持っており、ユーザーが選択できる靴のサイズを知りたいと思っています。これらの値を取得する可能性はありますか?Magento webservice API製品オプション

ありがとうございます!あなたがこれを行うことができますMagentoのSOAPのAPIのV1用

答えて

1

$client = new SoapClient('http://magentohost/api/soap/?wsdl'); 

// If somestuff requires api authentification, 
// then get a session token 
$session = $client->login('apiUser', 'apiKey'); 

$result = $client->call($session, 'product_attribute.info', '11'); 
var_dump ($result); 

// If you don't need the session anymore 
//$client->endSession($session); 

あなたは、オプションのリストで、必要な属性に関する完全な情報を取得します。


例応答:

array 
    'attribute_id' => string '11' (length=3) 
    'attribute_code' => string 'new_special_price' (length=17) 
    'frontend_input' => string 'text' (length=4) 
    'default_value' => null 
    'is_unique' => string '0' (length=1) 
    'is_required' => string '0' (length=1) 
    'apply_to' => 
    array 
     empty 
    'is_configurable' => string '0' (length=1) 
    'is_searchable' => string '0' (length=1) 
    'is_visible_in_advanced_search' => string '0' (length=1) 
    'is_comparable' => string '0' (length=1) 
    'is_used_for_promo_rules' => string '0' (length=1) 
    'is_visible_on_front' => string '0' (length=1) 
    'used_in_product_listing' => string '0' (length=1) 
    'frontend_label' => 
    array 
     0 => 
     array 
      'store_id' => int 0 
      'label' => string 'special price' (length=13) 
     1 => 
     array 
      'store_id' => int 2 
      'label' => string 'special price' (length=13) 
    'scope' => string 'store' (length=5) 
    'additional_fields' => 
    array 
     'frontend_class' => null 
     'is_html_allowed_on_front' => string '1' (length=1) 
     'used_for_sort_by' => string '0' (length=1) 

source

関連する問題