Skip to content

Document extension points

Document extension points

This page documents the new Document System (v2)

The reworked document generation is an experimental feature. Activate it with the DOCUMENT_GENERATION_REWORK feature flag. Its API can change until it becomes the default with Shopware 6.8.

Document System (v2) extends through three tagged Symfony services and Twig template overrides. There is no service decoration.

You want toMechanism
Change how a document looksOverride a document template
Add data to an existing documentEnrich document data
Change how a format is producedOverride a built-in renderer
Output a new file formatAdd a document format
Create a new kind of documentAdd a document type

Each extension point attaches to one stage of the pipeline: a document type shapes the render plan, a data provider feeds the render loop, and a renderer or a template override changes what that loop produces.

Extend with a plugin

Plugins register the tagged services and override the templates directly:

Document System (v2) plugin guides

Extend with an app

Apps extend documents declaratively: the manifest registers a document type, Twig templates render it, and the document-generation script hook provides the data. Apps cannot add custom formats, renderers, or typed data providers, those stay plugin-only.

Document System (v2) app guide
Was this page helpful?
UnsatisfiedSatisfied
Be the first to vote!
0.0 / 5  (0 votes)