Store figures and exports
This page is for merchants, the people who prepare figures for the accountant, and developers who need store data outside the administration. The order list has no spreadsheet export, so this page lists what does exist, what each produces, and what remains to be built.
Contents
What exists
| Need | Tool | Output |
|---|---|---|
| Sales per product and month | Store > Statistics (shop/statistics) | Screen |
| Trends, open orders, abandoned baskets | Store dashboard | Screen |
| Orders, items, customers, statistics | expservices order services (exporder::list, view, items, statistics, customers and more) | JSON |
| Products of a subtree | bin/php/ezcsvexport.php | CSV, one file per class |
| Who changed what in commerce | Audit export (audit/export) | CSV, JSON lines or JSON |
Month-end figures
- Store > Statistics for the month: products, quantities and totals per currency.
- The dashboard's 30-day figures for trends and the share of failed, cancelled and refunded orders, which count as orders but not as revenue on the dashboard.
- Write the figures into your monthly report as described in Store reports.
The statistics count placed orders only, never temporary ones (eZOrder::orderStatistics() filters
is_temporary = 0); archived orders are included.
Order data as JSON
The expservices extension, shipped in the repository's extension/ folder, offers the shop's data as remote
services (Headless commerce with expservices). For figures and exports:
| Service | Returns | Policy |
|---|---|---|
exporder::list | Orders, filterable by status and archived, sorted by created, id, total or user name, paged | shop/administrate |
exporder::view, exporder::items, exporder::history | One order, its lines, its status history | shop/administrate |
exporder::statistics | Products sold in a year or month with totals per currency | shop/administrate |
exporder::customers, exporder::customerOrders | Customers and their orders | shop/administrate |
A script with a personal API token of a dedicated user (with shop/administrate and nothing else) can fetch these
and write a spreadsheet. The extension was added as version 0.1.0 and its feature page calls it a first draft; test
the services you rely on after updates.
Product data as CSV
php bin/php/ezcsvexport.php --storage-dir=export <node id>writes one CSV file per content class for the subtree, prices in the text format of the price datatype (Price fields compared). Use it for a price list, a catalog check, or as a template for an import.
Audit exports
With audit/export, the Audit tab exports the console's filter as CSV, JSON lines or JSON, for example all
commerce.* events of a month (Commerce audit trail).
An accounting export
An export to an accounting system (orders with VAT per rate, payments, refunds) is not in the kernel. Build it as:
- a script that reads
exporder::listandexporder::view, or the order classes directly, filteringis_temporary = 0; or - an event on the after trigger of
shop_checkoutthat sends each placed order as it happens (Workflows on shop triggers).
Agree the fields with your accountant first. Leave customer data out unless the accounting system needs it.
Related pages
- Operating a store
- Store dashboard and reports
- Analytics for stores
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.