SSD · Slot 02 · Save file
Nightly Build
a.k.a. Day for Night Cinema version ›
A catalogue for professionals where the ERP is in charge: every night products, customers, orders and invoices reach the site, and every customer finds their own documents in the private area.
- Sector
- Paints, insulation and tools for trade professionals
- Period
- Oct 2025 — today
- Role
- ERP synchronisation: products, customers, orders and invoices
- Team
- 4 developers; the ERP import is almost entirely mine
The problem
ERR About 5,000 items with technical and safety data sheets in Italian and German, codes and data that change in the ERP.
WARN Trade customers want to see online the same orders and invoices they have in store.
The technical choice
- Patch 1.0.0
The ERP exports, the site imports
Items, customers, orders and invoices arrive as files exported by the ERP and are read by nightly PHP scripts, no WP-CLI needed.
- Patch 1.1.0
Batches and deltas
Products are processed in batches, invoices thousands of rows at a time: only what changed is written, and records gone from the ERP are removed.
- Patch 1.2.0
Automatic assets
Images, technical and safety data sheets in Italian and German are downloaded from the supplier catalogue and stored by item code.
- Patch 1.3.0
One import at a time
A lock stops two imports from overlapping when one runs longer than expected.
- Patch 1.4.0
Customer area
Orders and invoices are linked to the customer and shown in the private area, next to quotes and favourites built with the team.
How it works
- 0x01 ERP nightly exports
- 0x02 PHP cron lock · batches
- 0x03 Delta only the differences
- 0x04 Dedicated tables products, orders, invoices
- 0x05 Customer area Italian · German
In numbers
- ~5000 items imported from the ERP
- 4 nightly flows: items, customers, orders and invoices
- 2 languages: Italian and German