Quantcast
Channel: Programmierung - Shopware Community Forum
Viewing all articles
Browse latest Browse all 2871

RestAPI Hersteller Update funktioniert nicht, warum?

$
0
0

Hy,

ich wollte gerade mein Import-Script für die Herstellerinformationen auf die API umstellen. Vorher habe ich dieses direkt in die Datenbank geschrieben, da auch in SW4 die API mir immer Fehler geworfen hat.

Meine Abfrage, zum testen:

print_r(helper::$api->GET('manufacturers/'.$exists_manufacturer['id'])); 
										
									
helper::$api->PUT('manufacturers', $exists_manufacturer);


print_r($exists_manufacturer);

Das Ergebnis:

Array
(
    [data] => Array
        (
            [id] => 3
            [name] => Branston
            [image] => media/suppliers/Branston-Small.png
            [link] =>
            [description] => Mizkan Europe Ltd.<br>PO Box 145<br>Birmingham B24 8WR<br>UK
            [metaTitle] => Branston
            [metaDescription] =>
            [metaKeywords] =>
            [changed] => 2016-04-13T09:56:09+0200
            [attribute] =>
        )

    [success] => 1
    [call] => success
)
API: No Success: 3 This resource has no support for batch operations.
Array
(
    [id] => 3
    [name] => Branston
    [image] => media/suppliers/Branston-Smalls.png
    [link] =>
    [description] => Mizkan Europe Ltd.<br>PO Box 145<br>Birmingham B24 8WR<br>UK
    [metaTitle] => Branston
    [metaDescription] =>
    [metaKeywords] =>
    [changed] => 2016-04-13T09:56:09+0200
)

Es lassen sich also keine Herstellerdaten per PUT aktualisieren.
Selbst wenn ich es direkt mit "'manufacturers/'ID'" versuche, geht es nicht, es kommt dann "No Success: 3 Resource not found"

 

Weiß hier zufällig jemand von Shopware oder Kollegen, warum dies so ist? Sonst würde ich wieder auf die SQL Variante umsatteln.

 

Beste Grüße

 

 


Viewing all articles
Browse latest Browse all 2871

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>