03.2 · Case
Day for Night
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.
Scene 01The problem
About 5,000 items with technical and safety data sheets in Italian and German, codes and data that change in the ERP.
Trade customers want to see online the same orders and invoices they have in store.
Scene 02The technical choice
- Shot 01
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.
- Shot 02
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.
- Shot 03
Automatic assets
Images, technical and safety data sheets in Italian and German are downloaded from the supplier catalogue and stored by item code.
- Shot 04
One import at a time
A lock stops two imports from overlapping when one runs longer than expected.
- Shot 05
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.
Scene 03How it works
- 01 ERP nightly exports
- 02 PHP cron lock · batches
- 03 Delta only the differences
- 04 Dedicated tables products, orders, invoices
- 05 Customer area Italian · German
Scene 04In numbers
- ~5000 items imported from the ERP
- 4 nightly flows: items, customers, orders and invoices
- 2 languages: Italian and German