Skip to content

DmfUspBanner ​

DmfUspBanner shows your customer benefits above the storefront header: free shipping over a threshold, a returns period, delivery times. The banner shares its row with the language and currency switchers and colours the whole strip.

It is maintained per sales channel, and every text is translatable. Before Guppy 2.8.0 this lived in the theme configuration, where every sales channel using the same theme shared one set of texts and there was no language dimension at all.

Quick facts ​

Composer packagedmf/sw6-plugin-usp-banner
Plugin classDmf\UspBanner\DmfUspBanner
NamespaceDmf\UspBanner
Shopware>= 6.7.0
RequiresDmfSplideSlider
StorageOwn entity dmf_usp_banner, one banner per sales channel
Maintained inContent → USP banner
Repositorydmf / plugin-usp-banner

Installation ​

bash
composer require dmf/sw6-plugin-usp-banner
bin/console plugin:refresh
bin/console plugin:install --activate DmfUspBanner
bin/console cache:clear
bin/console administration:build
bin/console theme:compile

Features ​

  • Two layouts: Standard (one text with an optional link) and Benefits (up to three texts side by side, turning into a slider once they no longer fit).
  • One banner per sales channel, backed by a unique index. Channels that already have one are not offered in the select.
  • Every text is translatable, the link included, so a bilingual shop points each language at its own landing page.
  • Link selection through the same picker the Shopping Experiences use: category, product, media file, e-mail address, phone number or an external URL.
  • WCAG 2.1 AA contrast check right below the colour pickers, with a warning below 4.5:1 (BFSG).
  • Own ACL privileges under dmf_usp_banner (viewer, editor, creator, deleter).
  • Storefront snippets for de-DE, en-GB, es-ES, fr-FR, it-IT, nl-NL and pl-PL.

Configuration ​

Unlike most plugins, DmfUspBanner ships no plugin configuration. Banners are created in the administration under Content → USP banner, because they are maintained per sales channel and per language.

FieldTypeDefaultEffect
Sales channelselect–The channel this banner belongs to. Exactly one per channel.
EnabledboolfalseOff hides the banner regardless of its content.
LayoutselectStandardDecides which of the fields below are read.
Texttext, translated–Standard only. Without a text in the current language the banner does not render there.
Linklink picker, translated–Standard only. Without a link the text is rendered unlinked.
Open link in a new tabboolfalseAdds target="_blank" with rel="noopener".
Link positionselectCenterLeft or Center, relative to the page. Ignored from two benefits onwards.
Benefit 1 to 3text, translated–Benefits only. Empty slots are closed up rather than rendered as a gap.
Background colourcolour#EEEEEEColours the whole strip, switchers included.
Text colourcolour#2B3136Applies to the banner text and the switchers beside it.
Hover colourcolour–Optional. Left empty, everything keeps the text colour on hover.

Usage ​

  1. In the administration open Content → USP banner and choose Add USP banner.
  2. Select the sales channel and enable the banner.
  3. Pick the layout: Standard for one statement with a link, Benefits for up to three customer benefits.
  4. Enter the texts. Use the language switch in the smart bar to maintain each language separately.
  5. Set the colours and check the contrast value below the pickers.
  6. Save.

Limitations ​

Texts from the theme configuration are not migrated

If you maintained a USP banner through the theme settings before Guppy 2.8.0, enter the texts here once. The theme cannot write into a plugin that may not be installed.

Three fixed benefit fields

The Benefits layout has exactly three fields. More benefits require a migration in the plugin.

Themes overriding the top bar block

The banner renders from core's layout_header_top_bar block. A theme overriding that block without calling parent() drops the banner.

Notes ​

  • Exactly one banner per sales channel. A second one cannot be staged behind the current banner, so changing what it says always overwrites what is live.
  • Internal link targets are stored as a placeholder and resolved at render time, so the same banner links correctly in every sales channel and language.
  • Below a viewport width of 1200 pixels the benefits turn into a slider.
  • The banner's background colour overrides the theme's top bar background colour while the banner is shown.