Usage
Opening the settings
Open the Afterbuy extension configuration (plugin settings). Settings can be overridden per sales channel — use the correct channel.
API settings
Option |
Meaning |
|---|---|
Activate interface |
Master switch for export and shipping status sync |
User Token / Partner Token |
Credentials for the Afterbuy shop interface |
Test credentials |
Validates tokens against Afterbuy |
Credentials: Afterbuy account → show access data.
Transfer settings
Typical options:
Customer recognition / Product recognition — how Afterbuy matches customer and product
Feedback date — controls Afterbuy feedback / email behaviour
Transfer shipping — if disabled, Afterbuy calculates shipping costs
Always transfer shipping address — also sends the shipping address (
Lieferanschrift/KL*) when it matches the billing addressSKU used for discounts — article number for discount line items (default:
10000)Product attributes for Artikelnr / AlternArtikelNr1 / ArtikelStammID
Afterbuy marking ID (optional) — Afterbuy-internal ID of a custom colour marking (
MarkierungID); the marking must exist in Afterbuy
The Shopware customer comment on the order is always sent as Afterbuy field Kommentar. There is no separate toggle for this.
Order status
Option |
Meaning |
|---|---|
Order state for export |
Only orders with this status are transferred. If empty, the default is |
Order state after export |
Optional Shopware status after a successful transfer |
Shipping status for shipped orders |
Optional delivery status set by the shipping status sync |
How order export works
There is no immediate export on checkout. Flow:
Scheduled task
netzkollektiv.afterbuy_processor_task(every 5 minutes) or CLIEligible orders are queued on the message bus
The worker sends each order to Afterbuy
Which orders are exported?
Interface active, tokens set and valid
Sales channel matches the storefront channel being processed
No tag
afterbuy-processedOrder status matches the setting (otherwise
open)
After an attempt (success or failure) the order gets the tag afterbuy-processed and a note in the internal comment (Shopware ≥ 6.7) or customer comment (older). Failed exports are not retried automatically — remove the tag to export again.
Manual export (CLI)
bin/console netzkollektiv-extensions:afterbuy:process <sales-channel-id> [order-number]
Then consume the queue, e.g.:
bin/console messenger:consume async -vv
Shipping status sync
Sync uses the Afterbuy XML API (GetSoldItems):
Scheduled task
netzkollektiv.afterbuy_shipping_status_task(hourly) or CLITransactions with a shipping date in the last 2 days (max. 250)
Match via Afterbuy
OrderIDAlt= Shopware order numberTracking codes → delivery tracking; optional configured shipping status
Manual (CLI)
bin/console netzkollektiv-extensions:afterbuy:check-shipping <sales-channel-id>
Logs and troubleshooting
Log file: var/log/netzkollektiv_afterbuy*.log
Typical messages:
Message |
Meaning |
|---|---|
|
Interface off or tokens empty |
|
Token check failed |
|
No matching order (status / channel / tag) |
|
Queued — worker must be running |
|
Afterbuy rejected the order (see order comment) |
Infrastructure notes
Without a running message consumer / admin worker, tasks and export messages stay queued.
After a plugin update, restart any persistent consumer.
Export and shipping sync share the same active switch and tokens (per sales channel).