E-commerce and ERPs
Project 2
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.
The 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.
How I built it, 1 of 5
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.
How I built it, 2 of 5
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.
How I built it, 3 of 5
Automatic assets
Images, technical and safety data sheets in Italian and German are downloaded from the supplier catalogue and stored by item code.
How I built it, 4 of 5
One import at a time
A lock stops two imports from overlapping when one runs longer than expected.
How I built it, 5 of 5
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
- ERP nightly exports
- PHP cron lock · batches
- Delta only the differences
- Dedicated tables products, orders, invoices
- Customer area Italian · German