dongyan5239 2013-02-07 15:51
浏览 34
已采纳

Magento Soap V2 catalogProductListOfAdditionalAttributes无法识别。

I am reading magnetos documentation and in there they have a section that shows how to retrieve a products additional attributes.

http://www.magentocommerce.com/api/soap/catalog/catalogProduct/catalog_product.listOfAdditionalAttributes.html

One of the examples they show is the following for 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->catalogProductListOfAdditionalAttributes($sessionId, 'simple', '13');
var_dump($result);

Well I tried that example and I get a soap error. that says the following

Fatal error: Uncaught SoapFault exception: [Client] Function ("catalogProductListOfAdditionalAttributes") is not a valid method for this service

I looked up the method in wsdl xml page and I couldn't find anything that remotely matched it. So is the documentation out dated ?? Is my wsdl out date or whats going on here ? I am using v2

  • 写回答

1条回答 默认 最新

  • doufu8887 2013-02-07 20:55
    关注

    Figured it out...

    $attributeList = $fclient->catalogProductAttributeList($fsession, $prod->set);
    

    The above give you additional and core attributes. Where $prod->set is the products attribute set number.

    And even better. if you want to get ALL of a certain products attributes values, you can do the following

            foreach($attributeList as $attr) {
                $attributes->additional_attributes[] = $attr->code;
            }
            $prodInfo = $fclient->catalogProductInfo($fsession, $prod->product_id, null,$attributes);
    

    The above will return back all of a products attribute's values both core and custom within additional attributes.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 gradio的web端页面格式不对的问题
  • ¥15 求大家看看Nonce如何配置
  • ¥15 Matlab怎么求解含参的二重积分?
  • ¥15 苹果手机突然连不上wifi了?
  • ¥15 cgictest.cgi文件无法访问
  • ¥20 删除和修改功能无法调用
  • ¥15 kafka topic 所有分副本数修改
  • ¥15 小程序中fit格式等运动数据文件怎样实现可视化?(包含心率信息))
  • ¥15 如何利用mmdetection3d中的get_flops.py文件计算fcos3d方法的flops?
  • ¥40 串口调试助手打开串口后,keil5的代码就停止了