Skip to content

P2Lab Dynamic Variables for Shopware 6

Define content once, drop it anywhere. Variables resolve per language and per sales channel, and only the styles and scripts you actually use get loaded.

Dynamic Variables turn {placeholders} into real content at render time. Create a variable in the admin, write your CMS / product / category text once with {variableName}, and the storefront replaces it with the correct value for the current language and sales channel — with optional CSS and JavaScript that only load when the variable is actually used on the page.

Multi-language values

Values are translatable via Shopware’s native translation system. Each storefront language shows its own copy.

Multi-channel values

Per sales channel overrides with automatic fallback to the global value when no override exists.

WYSIWYG picker

A Dynamic Variables button in the text editor lets you browse and insert variables — no need to remember keys. Live preview shows resolved content.

Per-variable CSS & JS

Attach styles and scripts to a variable. The storefront injects them only on pages that actually use the variable.

  1. Go to Settings → Content → Dynamic Variables and click Add Variable.
  2. Pick a key (e.g. promotionText) and add one or more values — global, per channel, per language.
  3. Use {promotionText} anywhere in your CMS text blocks, product fields or category content.
  4. The storefront replaces the placeholder with the matching value at render time, in the right language and channel.

Four built-in variables — {shopName}, {shopEmail}, {shopAddress}, {shopBankAccount} — are available immediately with no setup. CMS replacement is on by default; product and category replacement are opt-in in plugin settings.