Reputation: 501
I am working with Magento 1.6 and try to call the Soap API V2 to get product-information (attributes and additional attributes).
If use soapUI or try to generate a request in java to get information of the product and its additional attributes a new entry gets written to the system log, saying:
2012-01-20T08:33:04+00:00 DEBUG (7): array_merge() [<a href='function.array merge'>function.array-merge</a>]: Argument #2 is not an array/opt/website/magento/app/code/core/Mage/Catalog/Model/Product/Api/V2.php
So I neither get those attributes nor can I update these on a product.
Does anybody have idea to come over this issue!
thanks
Upvotes: 1
Views: 779
Reputation: 501
Well I figured it out!
There seems to be a "bug" in that file! So if you request only one attribute the array_merge() function can't join the variable because the $attribute variable is not an array.
Try to send multiple attributes with soaoUI:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:Magento">
<soapenv:Header/>
<soapenv:Body>
<urn:catalogProductInfoRequestParam>
<sessionId>b595ed396f1901142cb284e4c280df82</sessionId>
<productId>7271</productId>
<!--Optional:-->
<store>0</store>
<!--Optional:-->
<attributes>
<additional_attributes>
<complexObjectArray>atribute</complexObjectArray>
<complexObjectArray>atribute</complexObjectArray>
<complexObjectArray>atribute</complexObjectArray>
<complexObjectArray>atribute</complexObjectArray>
<complexObjectArray>atribute</complexObjectArray>
</additional_attributes>
</attributes>
<!--Optional:-->
<identifierType/>
</urn:catalogProductInfoRequestParam>
</soapenv:Body>
</soapenv:Envelope>
Upvotes: 3