Shopware API: Umsetzung Beispiel

Hallo, ich versuche aktuell das Beispiel aus dem Wiki umzusetzen und scheitere leider daran: $minimalTestArticle = array( 'name' =\> 'Turnschuh', 'active' =\> true, 'tax' =\> 19, 'supplier' =\> 'Turnschuh Inc.', 'categories' =\> array( array('id' =\> 15), ), 'mainDetail' =\> array( 'number' =\> 'turn' . uniqid(), 'prices' =\> array( array( 'customerGroupKey' =\> 'EK', 'price' =\> 999, ), ) ), ); $result = $this-\>getApiClient()-\>post('articles', $minimalTestArticle); $id = $result['data']['id']; echo $id; $updateArticle = array( 'configuratorSet' =\> array( 'groups' =\> array( array( 'name' =\> 'Groesse', 'options' =\> array( array('name' =\> 'S'), array('name' =\> 'M'), array('name' =\> 'L'), array('name' =\> 'XL'), array('name' =\> 'XXL'), ) ), array( 'name' =\> 'Farbe', 'options' =\> array( array('name' =\> 'Weiß'), array('name' =\> 'Gelb'), array('name' =\> 'Blau'), array('name' =\> 'Schwarz'), array('name' =\> 'Rot'), ) ), ) ), 'taxId' =\> 1, 'variants' =\> array( array( 'isMain' =\> true, 'number' =\> 'turn', 'inStock' =\> 15, 'addtionnaltext' =\> 'L / Schwarz', 'configuratorOptions' =\> array( array('group' =\> 'Groesse', 'option' =\> 'L'), array('group' =\> 'Farbe', 'option' =\> 'Schwarz'), ), 'prices' =\> array( array( 'customerGroupKey' =\> 'EK', 'price' =\> 1999, ), ) ), array( 'isMain' =\> false, 'number' =\> 'turn.1', 'inStock' =\> 15, 'addtionnaltext' =\> 'S / Schwarz', 'configuratorOptions' =\> array( array('group' =\> 'Groesse', 'option' =\> 'S'), array('group' =\> 'Farbe', 'option' =\> 'Schwarz'), ), 'prices' =\> array( array( 'customerGroupKey' =\> 'EK', 'price' =\> 999, ), ) ), array( 'isMain' =\> false, 'number' =\> 'turn.2', 'inStock' =\> 15, 'addtionnaltext' =\> 'S / Rot', 'configuratorOptions' =\> array( array('group' =\> 'Groesse', 'option' =\> 'S'), array('group' =\> 'Farbe', 'option' =\> 'Rot'), ), 'prices' =\> array( array( 'customerGroupKey' =\> 'EK', 'price' =\> 999, ), ) ), array( 'isMain' =\> false, 'number' =\> 'turn.3', 'inStock' =\> 15, 'addtionnaltext' =\> 'XL / Rot', 'configuratorOptions' =\> array( array('group' =\> 'Groesse', 'option' =\> 'XL'), array('group' =\> 'Farbe', 'option' =\> 'Rot'), ), 'prices' =\> array( array( 'customerGroupKey' =\> 'EK', 'price' =\> 999, ), ) ) ) ); $this-\>getApiClient()-\>put('articles/' . $id, $updateArticle); Quelle: http://wiki.shopware.de/Shopware-4-API- … 0_869.html Die einzige Änderung, die ich gemacht habe ist die „Größe“ => „Groesse“, damits nicht an irgendeinem Kodierungsproblem scheitert. Als Fehlermeldung erhalte ich: [quote] HTTP: 201 Success Array ( [id] => 280 [location] => http://xxxxxx/shopware/api/articles/280 ) HTTP: 500 No Success Errormesage: SQLSTATE[23000]: Integrity constraint violation: 1048 Column ‚name‘ cannot be null [/quote] Ideen? Gruß, Michael

Hallo, ich glaube in unserem Beispiel hat sich ein Schreibfehler eingeschlichen. addtionnaltext ist falsch geschrieben. Ein n zu viel. Pass das mal an und prüfe es dann erneut Sebastian

Hallo Sebastian, hatte den Grund noch gefunden! Das Problem war das ‘Weiß’, also das übersehene Sonderzeichen. Nachdem ich das ersetzt hatte lief alles! Der Schreibfehler hatte hier nicht für Probleme gesorgt. Generell zur API: Gibts dazu eine abschließende Dokumentation? Gruß, Michael