Introduction
P2Lab Dynamic Variables is a Shopware 6 plugin that adds reusable content placeholders to your storefront. Define a value once in the admin, drop {placeholder} syntax into your CMS / product / category content, and the plugin replaces it with the right value for the current language and sales channel.
What it does
Section titled “What it does”The plugin adds a Dynamic Variables entry under Settings → Content. From there you can:
- Create variables with a custom key (e.g.
promotionText,footerDisclaimer) - Add per-language values via Shopware’s native translation system
- Add per-sales-channel overrides on top of a global fallback value
- Restrict where a variable is allowed to be used (CMS pages, products, categories — or anywhere)
- Attach custom CSS and JavaScript that only load when the variable is actually used on the page
- Insert variables through a button in the WYSIWYG text editor with a live preview
Four built-in variables — {shopName}, {shopEmail}, {shopAddress}, {shopBankAccount} — are exposed automatically from your basic store settings, so you can test the feature without creating anything.
Who it is for
Section titled “Who it is for”- Merchants who want to centralize repeated phrases (promo banners, shipping disclaimers, legal text) and update them in one place instead of editing every CMS page.
- Multi-language shops that need different copy per storefront language without duplicating CMS pages.
- Multi-channel shops that need different content per sales channel — for example a marketplace-specific footer or a partner-store disclaimer.
- Agencies building Shopware sites who need composable content that survives content updates and migrations.
Replacement scopes
Section titled “Replacement scopes”The plugin can replace variables in three different places:
| Scope | Default | What gets replaced |
|---|---|---|
| CMS | enabled | Text blocks, HTML blocks, and product description fields rendered through CMS elements. |
| Product | disabled | Product name, description, meta title and meta description. |
| Category | disabled | Category name, description, meta fields, breadcrumbs and navigation labels. |
CMS replacement is enabled by default. Product and category replacement are opt-in in plugin settings, so you can roll them out once you are ready.
What’s next
Section titled “What’s next”- Installation — install via Plugin Manager or Composer.
- Plugin settings — pick which scopes are active.
- Your first variable — create a variable end-to-end.