Skip to content

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.
  • /nexalia redirects to /price-alerts.

✅ Verify

  1. Price Alerts → Nexalia → save credentials + Test login.
  2. Import Products → table fills with name/url/sku/gtin/price/currency; K18 SKU 161718 has GTIN 858511000817.
  3. Export CSV downloads those columns.
  4. Start cron → status Active with next run; stop works.
  5. Tests: pytest backend/service_omni/app/tests/test_nexalia_client.py

📁 Files

  • backend/service_omni/app/services/nexalia/ — client + scraper
  • backend/service_omni/app/api/v1/endpoints/nexalia.py — API + CSV + cron
  • backend/service_omni/app/crud/nexalia.py, schemas/nexalia.py
  • backend/service_omni/app/core/schema_patches.py — table/column ensure
  • docker/postgres/tables/nexalia_*.sql, updates/add_nexalia_*.sql
  • frontend/src/pages/PriceAlerts/Tabs/NexaliaTab.jsx
  • frontend/src/services/api/omni/nexalia.js
  • docs/docs/services/service_omni/services/nexalia.md
  • docs/docs/patchnotes/1.11/1.11.12.md — this file