Er du tilfreds med indholdet i denne her guide?
Hvis ikke, så vil vi meget gerne høre dine kommentarer.
Skriv dem herunder, så gør vi det bedste, vi kan for at forbedre manualen.
Tak for din kommentar!
The method for updating a product is very similar to that of creating a new product. First an object or array with the data for the update is made, and the it is used as argument in the update method:
There are however a couple of differences. The first thing to note is that not alle fields have to be defined. Only the fields that are to be updated should be defined. In the example above, only Stock and CallForPrice are updated for the product with Id 1337. The remaining fields remain uneffected.
Besides the Id, it is possible to use the ItemNumber as the identifying field. However it should be noted that using the ItemNumber can effect more than one product, since it is not nessecarely unique:
This will update the Danish title of all products having the ItemNumber 'item234'.
The call returns an array of the ids of all affected products
If the Id is specified in the dataobject for the product update, this will alwats be used as the identifier. So if you want to update the ItemNumber of a product, this is possible by setting both the Id and the new Itemnumber: