FALLSTUDIE
ZEMA
Custom accounting CSV export across two WooCommerce webshops.
Kurzüberblick
- Branche: E-commerce (multi-store) + accounting operations
- Lieferumfang: Internal export tool that generates an accounting-ready CSV from WooCommerce orders
- Rolle: Architecture, implementation, data mapping
- Integrationspunkte: WooCommerce REST API (orders), Minimax reference links, payment provider dashboards
- Status: Production internal tool
Kontext
ZEMA operates two webshops and needs consistent accounting exports. The required workflow was a CSV file with a stable schema, semicolon delimiter and Excel-friendly encoding, plus drill-down links to WooCommerce, Minimax, and payment processors.
Problem
- Accounting needs a consolidated CSV with predictable columns and encoding.
- Exports must be filterable by paid date range, order status, and payment method.
- Minimax invoice references should be included when orders were already exported.
- Transactions should be traceable to provider dashboards (Stripe/PayPal/Bankart).
- Large order volumes require deterministic pagination.
Lösungsüberblick
We built a secure internal tool that:
- Selects one of two WooCommerce sites and an export period.
- Fetches all paid orders via WooCommerce REST API with pagination support.
- Extracts Minimax export metadata from order meta (e.g. `_minimax_exported`, `f_IssuedInvoiceId`).
- Outputs an accounting-ready CSV (UTF-8 BOM, `;` delimiter) streamed via `php://output`.
Architektur & technischer Ansatz
WooCommerce retrieval
- Uses the WooCommerce PHP client (`automattic/woocommerce`) against `wc/v3`.
- Filters by paid date window (`paid_after`, `paid_before`).
- Iterates pages based on `x-wp-totalpages` response header.
Export mapping
- Maps order id/status, billing details, totals, timestamps, and payment method.
- Builds WooCommerce admin edit URL per order.
- If Minimax invoice id exists, builds a direct Minimax UI link.
- If transaction id exists, builds a provider link (Stripe/PayPal/Bankart) where applicable.
CSV output
- Writes UTF-8 BOM for spreadsheet compatibility.
- Uses semicolon delimiter for accounting imports.
- Streams rows to avoid high memory usage.
Technologie-Stack
- PHP
- WooCommerce REST API + WooCommerce PHP client
- Basic access protection
Results & Impact
- Accounting gets a consistent, import-ready CSV from either webshop on demand.
- Faster reconciliation through direct drill-down links (WooCommerce, Minimax, payment dashboard).
- Reduced manual work and fewer bookkeeping mistakes.
Summary
A small internal export application that fetches paid WooCommerce orders, enriches them with Minimax and payment references, and outputs an accounting-ready CSV—built for multi-store operations and reconciliation workflows.