Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This is not a bug. I have been using this Magento SOAP API V2 for more than a year, and the concept which Magento team have applied here is absolutely correct.</p> <p>First of all, every time any one using the SOAP API V2 must check the WSDL fully of that respective Magento, so that he can create / call messages correctly. The URL to load the WSDL of SOAP API V2 is "<code>&lt;your_magento_home_page_url&gt;/api/v2_soap/index/wsdl/1</code>".</p> <p>Now coming back to your question, the type of the element "<code>additional_attributes</code>" is "<code>associativeArray</code>", which means its XML should look something like:-</p> <pre><code>&lt;additional_attributes&gt; &lt;!-- This XML tag "item" can be anything; it's what I use, but can definitely be any other valid non-used literal. --&gt; &lt;item&gt; &lt;key&gt;attribute_1_code&lt;/key&gt; &lt;value&gt;attribute_1_value_as_defined_in_database&lt;/value&gt; &lt;/item&gt; &lt;item&gt; &lt;key&gt;attribute_2_code&lt;/key&gt; &lt;value&gt;attribute_2_value_as_defined_in_database&lt;/value&gt; &lt;/item&gt; &lt;/additional_attributes&gt; </code></pre> <p>One example of the above XML format will be:-</p> <pre><code>&lt;additional_attributes&gt; &lt;item&gt; &lt;key&gt;color&lt;/key&gt; &lt;!-- I haven't provided the name / string "Blue", because Magento's EAV database structure will only hold the option value (which is a unique ID) and not the option literal string. --&gt; &lt;value&gt;56&lt;/value&gt; &lt;!-- assuming this value for "Blue" color --&gt; &lt;/item&gt; &lt;item&gt; &lt;key&gt;manufacturer&lt;/key&gt; &lt;value&gt;87&lt;/value&gt; &lt;!-- assuming this value for the manufacturer "Intel" --&gt; &lt;/item&gt; &lt;/additional_attributes&gt; </code></pre> <p>So, your "<code>$productData</code>" variable must hold the values like this:-</p> <pre><code>$productData ( [name] =&gt; testname [description] =&gt; testdescription [short_description] =&gt; shorttestdescription [weight] =&gt; 70 [status] =&gt; 1 [visibility] =&gt; 4 [price] =&gt; 359.0 [tax_class_id] =&gt; 2 [additional_attributes] =&gt; Array ( [0] =&gt; Array ( [key] =&gt; attribute1 [value] =&gt; 999.0 ) [1] =&gt; Array ( [key] =&gt; attribute2 [value] =&gt; testcontent ) ) ) </code></pre> <p>Hope it helps.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload