Skip to content

Document (v2) in plugins

Document (v2) in plugins

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.

These guides show how to extend the Document System (v2) as a plugin developer.

Prerequisites: a running plugin (see the plugin base guide) and the DOCUMENT_GENERATION_REWORK feature flag enabled for testing.

Add a document type

Create a new kind of document: a type class, a data provider, a Twig template, and the number range that numbers it.

Add a document type

Add a format renderer

Output a new file format, or replace a built-in renderer through tag priority.

Add a format renderer

Customize document data and templates

Add data to documents you did not create, and override the Twig templates that render them.

Customize document data and templates
Was this page helpful?
UnsatisfiedSatisfied
Be the first to vote!
0.0 / 5  (0 votes)