The challenge
A shop needed a proper point of sale inside its own WordPress. It had to be quick at the counter with a barcode scanner, keep track of stock and money owed, and be simple enough for a cashier who has never seen WordPress.
The solution
I wrote it as a standalone plugin with its own database tables and a separate page for each area: new sale, products, purchases, returns, sales history, customers, suppliers, expenses, reports, users and settings. Screens load and save over AJAX, so the cashier is not waiting for page reloads between items.
The part I like most is the application mode. When someone with a POS role logs in, the WordPress menus, admin bar and notices disappear, and any other admin page sends them back to the POS. To the cashier it feels like a desktop app. There are three roles, admin, manager and cashier, and each sees only what it needs.
Barcode labels print from the plugin using JsBarcode. Old data can be brought in through an importer or a SQL import. A daily scheduled backup writes the plugin's own tables to a protected folder, and those files can only be downloaded through the admin.
Results
- The POS runs on the shop's own WordPress and database
- Cashiers work in a clean app and never see WordPress
- Stock, purchases, returns and customer dues all in one place
- A backup runs every day without anyone having to remember