Doulat Khan Doulat Khan - 1 year ago 117
PHP Question

How to add and update images or image url in Volusion using Volusion API

Actually I have a store I am importing products to my store all the product data is insert and update well but the only image or image URL is not insert and update.

  1. This is my XML code with name dataPro.txt.

<productname>Test Product TA</productname>
<lastmodified>1/5/2016 10:25:00 AM</lastmodified>
<productmanufacturer>ASUS TeK</productmanufacturer>
<categorytree>New: Parts and Accessories</categorytree>

  1. This my PHP script.

$file = file_get_contents('dataPro.txt', true);

// Create the Xml to POST to the Webservice

$Xml_to_Send = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>";
$Xml_to_Send .= "<Volusion_API>";
// $Xml_to_Send .= "<!--";
$Xml_to_Send .= $file;
// $Xml_to_Send .= "\"\"";
// $Xml_to_Send .= "-->";
$Xml_to_Send .= "</Volusion_API>";

$url = "http://mysitedomian/net/WebService.aspx?Login=xxxxxxxxxxx&EncryptedPassword=xxxxxxxxx&Import=Insert-Update";

// Create the Header

// Post and Return Xml
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $Xml_to_Send);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type:application/x-www-form-urlencoded; charset=utf-8", "Content-Action:Volusion_API"));
$data = curl_exec($ch);

// Check for Errors
if (curl_errno($ch)){

print curl_error($ch);
} else {


// Display the Xml Returned on the Browser

echo $data;


Answer Source

We can add images by two methods, both are the manual not through API.

  1. From admin side of Volusion manually.

  2. Through FTP

FTP to:


For more detail please click on below link.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download