Edit (PUT) a resource
Unique parameter must take :
'resource' => Resource name ,
'id' => ID of a resource you want to edit,
'putXml' => Modified XML string of a resource
Examples are given in the tutorial
echo 'Other error'; } } } // Second : We update the data and send it to the web service if (isset($_GET['id']) && isset($_POST['id'])) { // Here we have XML before update, lets update XML with new values foreach ($resources as $nodeKey => $node) { $resources->{$nodeKey} = $_POST[$nodeKey]; } // And call the web service try { $opt = array('resource' => 'customers'); $opt['putXml'] = $xml->asXML(); $opt['id'] = $_GET['id']; $xml = $webService->edit($opt); // if WebService don't throw an exception the action worked well and we don't show the following message echo "Successfully updated."; } catch (PrestaShopWebserviceException $ex) { // Here we are dealing with errors $trace = $ex->getTrace(); if ($trace[0]['args'][0] == 404) { echo 'Bad ID'; } else { if ($trace[0]['args'][0] == 401) { echo 'Bad auth key'; } else { echo 'Other error<br />' . $ex->getMessage(); } } }