0
在這個上花了太多時間,我的頭痛......我需要獲得Magento中的製造商(自定義?)屬性值。正在使用SOAP獲取Magento中的製造商元素
網站的XML轉儲顯示我有這兩個廠家值只有一個元素: ...
<row>
<field name="value_id">7</field>
<field name="option_id">7</field>
<field name="store_id">0</field>
<field name="value">Hungry Gerbil</field>
</row>
<row>
<field name="value_id">8</field>
<field name="option_id">6</field>
<field name="store_id">0</field>
<field name="value">Hungry Hamster</field>
</row>
...
,我可以(7)通過SOAP調用獲得option_id:
<製造商 /製造商>
,我要轉換爲:
<製造商>飢餓沙鼠< /製造商>
的問題是,在實踐中我也不會訪問XML轉儲,所以我需要使用SOAP調用來檢索eav_attribute_option_value數據。 我已通過所有138個操作名稱使用該呼叫在[magento_root]消失:
$apicalls = array();
$i = 0;
// Optional filters
$filters = array('sku' => array('neq'=>''));
// Initial call to get a list of product IDs
$products = $client->call($session, 'catalog_product.list',array($filters));
// Loop through product IDs and grab attributes & images
foreach ($products as $product){
$apicalls[$i] = array('catalog_product_attribute.info', $product['product_id']);
$i++;
}
所以我假定無論是在例子中的「catalog_product_attribute.info」的正確替代上述將導致一個陣列,其包括eav_attribute_option_value數據。或者我正在尋找錯誤的地方...
如果Magento有更好的文檔記錄,這將有助於我們所有人,同時歡迎任何建議。
Tim