Skip to content

Single File Components

Single File Components ​

WARNING

Single File Component (SFC) support for Administration extensions is experimental. It is available since Shopware 6.7.16.0. The APIs described on this page can still change without a deprecation. Try it out and tell us what you find, but do not ship an extension built on it to customers or to the Shopware Store until the API is declared stable (planned for 6.9).

Overview ​

Administration components have traditionally been registered through the component factory using an Options API configuration and a separate template with TwigJS blocks as extension points.

Shopware is now moving towards native Vue. This makes onboarding easier for developers who are already familiar with standard Vue 3 patterns and tooling such as Single File Components, the Composition API, and composables. The extension system will feel much closer to standard Vue, reducing the need to learn Shopware-specific abstractions and conventions.

Components can now be written as Vue Single File Components (.vue files) using <script setup>. Extension points are declared with the native sw-block component instead of TwigJS blocks.

Where it stands ​

The system is available since Shopware 6.7.16.0 and is planned to become a stable API in 6.9. The roadmap has the timeline, what is supported, and the list of composables that replace mixins.

Before and after ​

The same override, written once with the component factory and TwigJS, and once as a Single File Component.

Start here ​

The fastest way in is to build something. The tutorial takes you from an empty directory to a plugin that warns a merchant when a product's profit margin is too low, on the product detail page:

Tutorial
Five chapters, one plugin, from an empty directory to a working override

The finished plugin on the product detail page

Four pages back it up:

API reference
The macros, the composables and the two components, in one place
Troubleshooting
The build errors and console messages you are most likely to meet, with their fixes
Roadmap
What works today and what is still coming
Internals
What the build does to your file, and what the block components do at runtime

Give us feedback ​

Tell us what you tried to extend and where the system got in your way. The roadmap has the details and the channel.

Was this page helpful?
UnsatisfiedSatisfied
Be the first to vote!
0.0 / 5  (0 votes)