2011-12-20 5 views
4

Magento webservice API의 설명서를 검색했지만 특정 제품의 변형/옵션을 가져 오는 옵션을 찾을 수 없습니다. 예를 들어 나는 신발을 가지고 있으며 사용자가 선택할 수있는 신발 사이즈를 알고 싶습니다. 이 값을 얻을 가능성이 있습니까?Magento webservice API 제품 옵션

미리 감사드립니다.

답변

1

젠토 SOAP API를 V1에 대해이 작업을 수행 할 수 있습니다

$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