Artikel aus ERPNext nach Shopware pushen #16

Closed
opened 2026-05-10 16:44:31 +00:00 by csaeum · 1 comment
csaeum commented 2026-05-10 16:44:31 +00:00 (Migrated from gitlab.localdomain)

ERPNext Items nach Shopware pushen (ERPNext ist führendes System):

  • Neuen Artikel in Shopware anlegen falls noch nicht vorhanden (POST /api/product)
  • Vorhandenen Artikel aktualisieren (PATCH /api/product/{id})
  • Felder: Artikelnummer, Name, Aktiv-Status
  • Shopware Product ID nach erfolgreichem Push im ERPNext Item speichern
  • Implementierung in shopware6/api/product.py
ERPNext Items nach Shopware pushen (ERPNext ist führendes System): - Neuen Artikel in Shopware anlegen falls noch nicht vorhanden (`POST /api/product`) - Vorhandenen Artikel aktualisieren (`PATCH /api/product/{id}`) - Felder: Artikelnummer, Name, Aktiv-Status - Shopware Product ID nach erfolgreichem Push im ERPNext Item speichern - Implementierung in `shopware6/api/product.py`
Owner

Implementiert in shopware6/api/product.py (push_items(), _get_fallback_tax_id(), _get_default_currency_id(), _push_item()), whitelisted Wrapper push_items() auf Shopware Account + neuer "Push Items"-Button.

  • Betrifft nur einfache Items (has_variants=0, kein variant_of) — Template-/Varianten-Push ist #19.
  • Create: POST /api/product mit clientseitig generierter UUID (Shopware liefert bei Create 204 No Content ohne Body, live bestätigt). Update: PATCH /api/product/{id} mit ausschließlich name+active.
  • Shopware verlangt beim Create laut offizieller Doku (developer.shopware.com/admin-api-reference) neben taxId auch ein price-Array mit currencyId sowie stock — nicht nur die im Issue genannten Felder. Da Preis/Steuer erst #18 ist, werden diese drei beim Create nur als Platzhalter gesetzt (stock: 0, price: 0/0, beliebige Tax-Entity, System-Standardwährung) und beim Update nie erneut angefasst.
  • Create-vs-Update läuft über das bestehende shopware_product_id Custom Field (#13/#14/#15), keine Ecommerce Item-Zwischenschicht.
  • Live gegen die echte Test-Instanz (Shopware 6.7.13.0) verifiziert: Create + Update-Round-Trip korrekt (inkl. disabled → active: false), zweiter Lauf idempotent (keine Duplikate), Testdaten wieder entfernt.

Details und Abgrenzung zu Julian/Marcel in Projekt.md → Architecture Decisions dokumentiert.

Implementiert in `shopware6/api/product.py` (`push_items()`, `_get_fallback_tax_id()`, `_get_default_currency_id()`, `_push_item()`), whitelisted Wrapper `push_items()` auf `Shopware Account` + neuer "Push Items"-Button. - Betrifft nur einfache Items (`has_variants=0`, kein `variant_of`) — Template-/Varianten-Push ist #19. - Create: `POST /api/product` mit clientseitig generierter UUID (Shopware liefert bei Create `204 No Content` ohne Body, live bestätigt). Update: `PATCH /api/product/{id}` mit ausschließlich `name`+`active`. - Shopware verlangt beim Create laut offizieller Doku (developer.shopware.com/admin-api-reference) neben `taxId` auch ein `price`-Array mit `currencyId` sowie `stock` — nicht nur die im Issue genannten Felder. Da Preis/Steuer erst #18 ist, werden diese drei beim Create nur als Platzhalter gesetzt (`stock: 0`, `price: 0/0`, beliebige Tax-Entity, System-Standardwährung) und beim Update nie erneut angefasst. - Create-vs-Update läuft über das bestehende `shopware_product_id` Custom Field (#13/#14/#15), keine `Ecommerce Item`-Zwischenschicht. - Live gegen die echte Test-Instanz (Shopware 6.7.13.0) verifiziert: Create + Update-Round-Trip korrekt (inkl. `disabled` → `active: false`), zweiter Lauf idempotent (keine Duplikate), Testdaten wieder entfernt. Details und Abgrenzung zu Julian/Marcel in `Projekt.md` → Architecture Decisions dokumentiert.
Sign in to join this conversation.
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Frappe-Projekte/ecommerce_integrations#16
No description provided.