Embedding legal texts in Shopware order confirmations
How Shopware storefronts and order-confirmation emails pull terms, the withdrawal notice and privacy information as a versioned HTML, JSON or PDF artifact from TermShelf — instead of maintaining full texts across sales channels and Twig mail templates.
Embedding legal texts in Shopware order confirmations
Shopware shops spread legal texts across several places: custom pages and shopping experiences in the storefront, the order-confirmation mail templates and optionally generated documents such as invoices. When the same shop runs across multiple sales channels — per language, market or B2B/B2C — the number of places where the same terms, withdrawal or privacy version must stay consistent grows.
The order confirmation is an operational special case: it is sent at a specific moment and effectively documents which version the customer saw. Copying the terms text directly into the Twig mail template couples that version to the template instead of to an approved, dated version.
What TermShelf does here — and what it doesn’t
TermShelf is not a Shopware plugin and not a legal-text generator. TermShelf is the central source where approved legal texts are managed, versioned, approved and delivered as an artifact. Shopware remains the shop system; it consumes the approved version instead of holding it itself.
Which texts are needed at which step of the order process is something teams should have reviewed professionally and legally. TermShelf organizes and delivers the approved versions — it does not replace the legal assessment of the content.
Why static texts in Shopware mails are problematic
Mail templates in Shopware are editable in the admin and Twig-based. As soon as a terms paragraph is hard-coded there, it lives outside any versioning:
- An update has to be repeated in every sales channel and every language template — easy to forget.
- The version sitting in the template cannot be unambiguously mapped to an approved, dated version.
- Importing a template set or a theme/storefront relaunch can silently bring back an old version.
This is a classic case of legal content drift — the visible version no longer matches the approved one.
Three integration patterns for Shopware
Regardless of whether the integration runs via a custom plugin, an app backend or an upstream middleware — there are three artifact forms from the Public Delivery API:
- PDF artifact as an attachment to the order confirmation when a self-contained, archivable version is desired.
- HTML fragment for a storefront page or a mail block when the text should appear within the layout.
- JSON for custom logic — for example when an app backend serves multiple sales channels and renders itself.
The formats in detail are compared in delivering legal content via API; the full delivery contract is described on the feature page Public Delivery API.
Versioning and the transaction moment
An order happens at a specific moment — and that includes the version approved at that moment. Via the Public Delivery API you can request either a fixed version number (?version=N) or the state at a timestamp (?effective_at=<ISO-8601>).
What matters for traceability is storing the version number used with the Shopware order. Which version applied when is covered in which terms version applied at contract conclusion.
Example flow
- Edit, review and approve the legal text in TermShelf.
- Publish the version — it becomes an immutable, dated snapshot.
- When generating the order confirmation, the Shopware integration fetches the right artifact for language, market and customer type, e.g. the HTML fragment of the terms for a DACH B2B sales channel:
GET /v1/delivery/sites/17/documents/terms/html
?locale=de-DE&market=DE&profile=B2BThe order confirmation uses the artifact as an HTML block or PDF attachment, and the delivered version stays traceable via the stored version number. Endpoints and headers are in the API reference.
Common mistakes
- Full terms text directly in the Twig mail template, drifting apart per sales channel on updates.
- A separate copy of the legal texts per storefront, maintained separately and drifting.
- The PDF is generated at order time, but the version number is stored nowhere.
- B2B and B2C sales channels silently receive the same version although different texts are intended.
What TermShelf does not do
TermShelf does not produce legally binding content and is not a substitute for legal advice. TermShelf does not provide an official, certified Shopware plugin and does not generate legal texts. What is described is an integration-open approach via the Public Delivery API; how deep the integration goes depends on the specific Shopware setup and the chosen artifact form.
Related guides
Frequently asked questions
- Is there an official TermShelf plugin for Shopware?
- This guide does not describe a pre-built marketplace listing but an integration-open approach via the Public Delivery API. Shopware pulls the approved version as HTML, JSON or PDF — via a custom plugin, an app backend or an upstream middleware.
- How do I get the right version per sales channel?
- Via the Public Delivery API parameters for language, market and profile, e.g. locale=de-DE, market=DE and profile=B2B. Each sales channel then automatically pulls the version approved for its variant instead of maintaining its own copy.
- How does it stay traceable which terms version applied to an order?
- By storing the version number fetched at order time with the Shopware order. Since every publication is a dated, immutable snapshot, the same version can be retrieved again later.
Related guides
Attaching terms as a PDF to order confirmations
How to attach the approved terms version as a PDF artifact from the Public Delivery API to transactional order confirmations — versioned and traceable.
Embedding the withdrawal notice in order confirmations
HTML in the email footer or PDF as attachment: how the approved withdrawal notice reaches transactional confirmations in a versioned way.
Which terms version applied at contract conclusion?
Version pinning, effective_at delivery and audit trail: how to establish the link between a transaction and the published version that applied at that time.