Abgleich: vorhandene ERPNext Artikel mit Shopware Artikeln verknüpfen #15
Labels
No labels
API
Artikel
B2B
B2C
Bestandssync
Bestellungen
DACH
DocType
Dokumentation
Grundgerüst
Import
Kategorien
Kunden
Lager
Mapping
Mehrsprachigkeit
Performance
Preise
Push
Scheduler
Schweiz
Steuern
Storefront
Sync
Varianten
Verbindung
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Frappe-Projekte/ecommerce_integrations#15
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Vorhandene ERPNext Items nachträglich mit Shopware-Produkten verknüpfen:
Implemented in a new
ecommerce_integrations/shopware6/api/reconcile.py(reconcile_items()), plus a whitelistedShopware Account.reconcile_items()method and a new "Reconcile Items" button.Research (Julian/Marcel): the underlying "match by SKU, link, don't touch anything else" pattern predates both forks — it's copied near-verbatim in both from this repo's own existing Shopify (
shopify/product.py:273) and Unicommerce (unicommerce/product.py:124) connectors, not a Shopware-specific contribution. Julian's_match_sku_and_link_item()(shopware6/product.py:393) is a silent fallback baked into product import (no report, one DB query per Shopware product, no UI button, links via a newEcommerce Itemrow). Marcel'sproduct_sync/api.py:509auto_adopt_by_sku()is much closer to this issue — its own whitelisted endpoint with a UI button and an{adopted, skipped_already_mapped, no_match, ambiguous}report, batched via Shopware'sequalsAnyfilter to avoid N+1 lookups.Design decisions:
list_products()(from #13, reused unchanged) already fetches the whole catalog in one paginated sweep (live-tested at 2279 products in #13/#14), so an in-memoryproductNumber → (shopware_id, is_variant)lookup dict avoids N+1 on both sides without any extra machinery.shopware_product_id/shopware_variant_idCustom Fields (from #13/#14), notEcommerce Item— consistent with the prior two issues and the issue's explicit requirement.Live verification: two pre-existing test Items (one matching a real parent SKU, one matching a real variant SKU) were correctly linked via the respective field, with all other fields left untouched; a third Item with a non-existent SKU stayed unlinked. Second run reported both as
already_linkedand relinked nothing (full idempotency). Test data cleaned up after verification.See
Projekt.md→ Architecture Decisions for the full writeup.Milestone 4 is now complete — all 4 issues (#12-#15) closed.