REST API ... useNumberAsID

hi

mit Hilfe von modifizierten ShopwareApi (jetzt caseSensitive URI mit kleinem D bei “useNumberAsId” in ArticleRessource.cs) und Standard-RestCharp lib habe ich folgendes gemacht:

 

ShopwareApi api = new ShopwareApi(this.settings.shopwareApiUri, this.settings.shopwareApiBenutzername, this.settings.shopwareApiKey);

ArticleMain ShopArtikel = new ArticleMain();
ShopArtikel.name = artikel.BezeichnungKurz;
ArticleMainDetail amd = new ArticleMainDetail();
amd.number = artikel.Artikelnummer;
ShopArtikel.mainDetail = amd;
Supplier supplier = new Supplier();
string lieferantenname = ArtikelService.LieferantennameAusArtikelId(artikel.Id);
supplier.name = lieferantenname;
ShopArtikel.supplier = supplier;
Tax tax = new Tax();
double steuerProzentsatz = ArtikelService.SteuerprozentAusArtikelId(artikel.Id);
tax.tax = steuerProzentsatz;
ShopArtikel.tax = tax;
ShopArtikel.active = true;
api.getArticleRessource().add(ShopArtikel);
// ShopId im WaWi einpflegen (es wird angenommen das die Artikelnummer andeutig ist)
ArticleMain ShopArtikelAngelegt = api.getArticleRessource().getByOrdernumber(artikel.Artikelnummer);
ArtikelService.SetArtikelShopId(artikel.Id, ShopArtikelAngelegt.id);

 

Also ohne die Serverkomponente Articles.php in der Function getAction() geändert zu haben, funktioniert die Geschichte nicht.

Ich hangele mich anscheinen von Fall zu Fall hier durch … gerade funktioniert die Gruppenanlage nicht. :frowning:

 

  1. ShopwareApi (https://github.com/shopdoktor/shopware-csharp-api-connector)