I am using Prestashop 1.5.6.2 version and OpenERP 7.
With the help of Webservice API, I am trying to add a cover image for a product.
I was successful in adding a product using webservice as the prestashop document mentioned http://doc.prestashop.com/display/PS15/Chapter+9+-+Image+management
Also in the image POST, I always provide an image file. So, I need to know how i can use Webservice API to add a COVER Image for a product.
RESPONSE WHEN NO COVER VALUE IS PASSED
<?xml version="1.0" encoding="UTF-8"?> <prestashop xmlns:xlink="http://www.w3.org/1999/xlink"> <image>
<id><[CDATA[2]]></id> <id_product><![CDATA[52]]></id_product> <position><![CDATA[20]]></position> <cover><![CDATA[1]]></cover> <legend><language id="1" xlink:href="https://presta.sodexis.com/api/languages/1"><![CDATA[]]></language></legend> </image> <content encode="base64"><![CDATA[bINARY IMAGE]]></content> </prestashop>
WHEN I PASS COVER="1":
<?xml version="1.0" encoding="UTF-8"?> <prestashop xmlns:xlink="http://www.w3.org/1999/xlink"> <errors> <error> <code><![CDATA[66]]></code> <message><![CDATA[unable to save this image]]></message> </error> </errors> </prestashop>
Thanks in advance.