cancel
Showing results for 
Search instead for 
Did you mean: 

Issues with attibute on Delphi/XML integration

SOLVED

Issues with attibute on Delphi/XML integration

Hi,

 

I'm making a Magento/Delphi integration with XML-RPC, by generate manually the XML file for each method and connecting with httprepresq. I have sucess with login, create, update and delete products, listas etc, but I can't make work with method product_attribute.addOption. For example, I have a attribute 'Tamanho' (size) with 'P', 'M', 'G' options already saved, and I traying to add 'GG' option by a XML file. My request is:

 

<?xml version="1.0" encoding="ISO-8859-1"?>
<methodCall>
  <methodName>call</methodName>
  <params>
    <param>
      <value>
        <string>69ac52e58225625d6d53c38380810893</string>
      </value>
    </param>
    <param>
      <value>
        <string>product_attribute.addOption</string>
      </value>
    </param>
    <param>
      <value>
        <array>
          <data>
            <value>
              <string>tamanho</string>
            </value>
            <value>
              <struct>
                <member>
                  <name>label</name>
                  <value>
                    <struct>
                      <member>
                        <name>store_id</name>
                        <value>
                          <string>0</string>
                        </value>
                      </member>
                      <member>
                        <name>value</name>
                        <value>
                          <string>GG</string>
                        </value>
                      </member>
                    </struct>
                  </value>
                </member>
                <member>
                  <name>order</name>
                  <value>
                    <i4>3</i4>
                  </value>
                </member>
                <member>
                  <name>is_default</name>
                  <value>
                    <i4>0</i4>
                  </value>
                </member>
              </struct>
            </value>
          </data>
        </array>
      </value>
    </param>
  </params>
</methodCall>

The response for that request is boolean, and I heve '1' value, it is, true. But on Magento the result is:

 

http://1drv.ms/1LSpGEt

 

Can anyone help me to solve this?

 

 

 

 

1 REPLY

Re: Issues with attibute on Delphi/XML integration

I find, the corretc is:

 

<?xml version="1.0" encoding="ISO-8859-1"?>
<methodCall>
  <methodName>call</methodName>
  <params>
    <param>
      <value>
        <string>f181b118497c74a97bfb1489016fd2be</string>
      </value>
    </param>
    <param>
      <value>
        <string>product_attribute.addOption</string>
      </value>
    </param>
    <param>
      <value>
        <array>
          <data>
            <value>
              <string>tamanho</string>
            </value>
            <value>
              <struct>
                <member>
                  <name>label</name>
                  <value>
                    <array>
                      <data>
                        <value>
                          <struct>
                            <member>
                              <name>store_id</name>
                              <value>
                                <array>
                                  <data>
                                    <value>
                                      <string>0</string>
                                    </value>
                                  </data>
                                </array>
                              </value>
                            </member>
                            <member>
                              <name>value</name>
                              <value>
                                <string>GG</string>
                              </value>
                            </member>
                          </struct>
                        </value>
                      </data>
                    </array>
                  </value>
                </member>
                <member>
                  <name>order</name>
                  <value>
                    <i4>3</i4>
                  </value>
                </member>
                <member>
                  <name>is_default</name>
                  <value>
                    <i4>0</i4>
                  </value>
                </member>
              </struct>
            </value>
          </data>
        </array>
      </value>
    </param>
  </params>
</methodCall>