Skip to content

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.

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.

  • 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.

The plugin can replace variables in three different places:

ScopeDefaultWhat gets replaced
CMSenabledText blocks, HTML blocks, and product description fields rendered through CMS elements.
ProductdisabledProduct name, description, meta title and meta description.
CategorydisabledCategory 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.