Appearance
Installation
For merchants
Requirements
- Shopware 6.6 or 6.7, PHP 8.2+ with the
sodiumextension (bundled by default), MySQL 8.0+ / MariaDB 10.11+. - The URL and credentials of the system that should receive orders.
- For background (asynchronous) targets: a running message-queue worker. For asynchronous acknowledgements: scheduled tasks running. See Step 4.
- A database backup — installation creates tables and a state machine.
1. Set the encryption key
Credentials are encrypted with a key derived from ORDER_EXPORT_ENCRYPTION_KEY, falling back to Shopware's APP_SECRET. Set a dedicated key before saving the first credential, in .env.local or your hosting environment:
bash
# a long random value, e.g. from: openssl rand -hex 32
ORDER_EXPORT_ENCRYPTION_KEY=<random-64-character-hex-string>Keep this key stable
Stored credentials can only be decrypted with the key they were saved with. If the key — or APP_SECRET, when no dedicated key is set — changes, every credential fails with Unable to decrypt credential (wrong or rotated key) and must be re-entered. Store the key with your other secrets and use the same value on every server.
2. Install the plugin
Order Export is proprietary and not on Packagist.
Option A — ZIP upload
- Get the release ZIP (version 0.9.0-beta.1) from KommandHub.
- Extensions → My extensions → Upload extension (Shopware: My extensions).
Option B — Composer from the repository
Requires read access to the repository. Add it to your project's composer.json:
jsonc
"repositories": [
{ "type": "vcs", "url": "https://github.com/KommandHub/KmhOrderExportSW.git" }
]bash
composer require "kommandhub/order-export-sw:^0.9@beta"For a private repository: composer config --global github-oauth.github.com <token> with a GitHub token that has read access (never commit it). Background: Shopware: extension management.
3. Activate
bash
bin/console plugin:refresh
bin/console plugin:install --activate KmhOrderExportSW
bin/console cache:clearActivation creates the tables kmh_order_export_credential, …_mapping, …_mapping_version, …_config, kmh_order_export, …_attempt, the export state machine, three screens under Settings → Extensions (Credentials, Export mappings, Export targets), the Order export card on orders, the Export order Flow Builder action and the scheduled task kmh_order_export.ack_timeout.
4. Background processing
| Job | Runs on | Needed when |
|---|---|---|
Export one order (ExportOrderMessage) | Shopware's async queue | A target uses Asynchronous (queued) execution |
Fail exports whose acknowledgement timed out (kmh_order_export.ack_timeout, every 5 minutes) | Scheduled tasks | A target uses Asynchronous (await callback) acknowledgement |
In production run a queue worker and the scheduled-task runner under a process supervisor, as described in Shopware: Message queue and Shopware: Scheduled tasks:
bash
bin/console messenger:consume async --time-limit=300 --memory-limit=512M
bin/console scheduled-task:run --time-limit=300Synchronous targets with no or synchronous acknowledgement need neither.
If you run several workers or servers, use a shared cache (for example Redis): the circuit breaker keeps its state in Shopware's application cache.
5. Permissions
Grant Order export (KommandHub) — Viewer, Editor, Creator, Deleter — in Settings → Users & permissions → Roles (Shopware: Users & permissions). Triggering an export needs Editor.
6. Verify: first export
- Settings → Extensions → Credentials → Add credential — e.g. API key, header
X-Api-Key, secret. See Credentials & targets. - Export mappings → Add mapping — paste the example, format JSON, save, pick an order, Test mapping, then Publish.
- Export targets → Add target — name, endpoint, method, mapping, credential; execution Synchronous, acknowledgement None. Test connection must report the endpoint reachable.
- Open an order → General → Order export card → choose the target → Export. The card shows exported.
- Check the order arrived in the receiving system.
- Automate it: add Export order to a flow — see Exporting orders.
Updating
bash
composer update kommandhub/order-export-sw # or upload the new ZIP
bin/console plugin:refresh
bin/console plugin:update KmhOrderExportSW
bin/console cache:clearKeep ORDER_EXPORT_ENCRYPTION_KEY unchanged across updates.
Uninstalling
Extensions → My extensions → ⋯ → Uninstall, or bin/console plugin:uninstall KmhOrderExportSW. Remove Export order actions from your flows first.
In 0.9.0-beta.1 uninstalling does not remove the plugin's tables or data, even if you choose not to keep plugin data: credentials (encrypted), mappings, targets and export history remain in the database. Drop the kmh_order_export* tables manually if you need them gone.