← Work Setup version IT/EN

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.

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
Stack
  • WordPress
  • PHP
  • WPML
  • Cron

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

  1. 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.

  2. 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.

  3. 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.

  4. Shot 04

    One import at a time

    A lock stops two imports from overlapping when one runs longer than expected.

  5. 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

  1. 01 ERP nightly exports
  2. 02 PHP cron lock · batches
  3. 03 Delta only the differences
  4. 04 Dedicated tables products, orders, invoices
  5. 05 Customer area Italian · German

Scene 04In numbers

Next scene → Long Shot Kitchens and home furniture