A PrestaShop module that automatically creates work orders in OpenMES whenever a customer places an order containing a product marked as "manufactured".
Part of the OpenMES ecosystem — see the main project at github.com/Mes-Open/OpenMes
- Flag any product as "Manufacture in OpenMES" directly from the product edit page
- Assign products to specific production lines (or use a global default)
- On order validation, a work order is automatically created in OpenMES via API
- Full order metadata (order reference, product name, customer ID) stored in
extra_data - All API calls logged in PrestaShop's message log
| Requirement | Version |
|---|---|
| PrestaShop | 1.7.8+ / 8.x |
| PHP | 7.4+ |
| OpenMES | any version with REST API |
| PHP extension | curl |
- Go to Back Office → Modules → Module Manager → Upload a module
- Upload
openmesconnector.zip - Click Configure once installed
Or manually copy openmesconnector/ into <prestashop>/modules/ and install from the module list.
- Go to Modules → OpenMES Connector → Configure
- Fill in:
- OpenMES API URL — e.g.
https://demo.getopenmes.com - API Token — generate one in OpenMES: Settings → API Tokens
- Default production line — where orders go when no specific line is assigned
- OpenMES API URL — e.g.
- Enable the integration
- Open any product in Catalog → Products
- Go to the OpenMES tab
- Toggle Manufacture this product → Yes
- Optionally select a production line for this product
- Save
Customer places order
│
▼
hookActionValidateOrder fires
│
▼
For each product → is "manufacture" flag set?
No → skip
Yes → POST /api/v1/work-orders to OpenMES
{
"order_no": "PS-XBKP7DYQ-42",
"planned_qty": 2,
"line_id": 3,
"description": "PrestaShop order #XBKP7DYQ — Widget XL",
"extra_data": { "source": "prestashop", ... }
}
| Symptom | Fix |
|---|---|
| Work orders not created | Check integration is Enabled and token is valid |
cURL error in logs |
Verify OpenMES URL is reachable from the PS server |
401 Unauthorized |
Token expired — generate a new one in OpenMES |
422 Unprocessable |
Duplicate order_no — order already exists in OpenMES |
Logs: Advanced Parameters → Logs (filter by [OpenMES]).
MIT — see LICENSE