1.11.12
⚙️ Patch 1.11.12 — Nexalia.de catalog scrape, CSV export, Price Alerts tab¶
🚀 Summary¶
Adds a Nexalia.de wholesaler catalog scraper (JTL-Shop AJAX + JSON-LD): login, scrape configured categories into nexalia_products, optional wholesale EAN mirror, CSV export, and a cron. UI lives under Price Alerts → Nexalia.
✨ Details¶
| Area | Behavior |
|---|---|
| Scrape | Category pages /{slug}_s{page}?isAjax → parse Product nodes (name, url, sku, gtin, price, currency, …) until empty pages |
| GTIN | Reads gtin13 and fallbacks (gtin / gtin12 / gtin14 / gtin8 / ean) — e.g. K18 UPC-only listings |
| Storage | nexalia_credentials + nexalia_products; optional wholesale_shopping_list.nexalia_preis / nexalia_bestand |
| API | Credentials CRUD/test, POST /catalog/scrape, GET /products, GET /products/export.csv, cron start/stop/status |
| Frontend | Price Alerts tab: credentials, cron builder, Import Products, product table, CSV download |
| Logging | Step logs (login → scrape → upsert → wholesale) with per-page counts and timings |
📌 Notes¶
- Redeploy service-omni and frontend. Apply
docker/postgres/updates/add_nexalia_tables.sql(or restart omni for auto-create / column patch). - No max-pages setting — categories are scraped until empty (safety ceiling only).
- Listing JSON-LD only exposes InStock/OutOfStock; in-stock qty comes from credentials
in_stock_qty. /nexaliaredirects to/price-alerts.
✅ Verify¶
- Price Alerts → Nexalia → save credentials + Test login.
- Import Products → table fills with name/url/sku/gtin/price/currency; K18 SKU
161718has GTIN858511000817. - Export CSV downloads those columns.
- Start cron → status Active with next run; stop works.
- Tests:
pytest backend/service_omni/app/tests/test_nexalia_client.py
📁 Files¶
backend/service_omni/app/services/nexalia/— client + scraperbackend/service_omni/app/api/v1/endpoints/nexalia.py— API + CSV + cronbackend/service_omni/app/crud/nexalia.py,schemas/nexalia.pybackend/service_omni/app/core/schema_patches.py— table/column ensuredocker/postgres/tables/nexalia_*.sql,updates/add_nexalia_*.sqlfrontend/src/pages/PriceAlerts/Tabs/NexaliaTab.jsxfrontend/src/services/api/omni/nexalia.jsdocs/docs/services/service_omni/services/nexalia.mddocs/docs/patchnotes/1.11/1.11.12.md— this file