In Shopware 6, you place the placeholder in the product page layout via Shopping Experiences. You load the script through the theme or a plugin for custom scripts, because since Shopware 6.5 the editor removes scripts from text elements.
New since Shopware 6.7.14 (and 6.6.10.24): Shopware has the GARAN label built in. You enter the guarantee duration on the product; brand and model identifier come from the manufacturer and the manufacturer product number. The widget adds the legal guarantee notice on the product page. Leave out data-garan-* in the widget so the GARAN label does not appear twice. Details below under “Variants and model identifier”.
The code for Shopware 6
<div data-garantielabel></div>
<script src="https://www.garantielabel.app/widget.js" async></script>Set further options such as display and language in the code builder.
Step by step in Shopware 6
- Open the Shopping Experience
In the Administration, go to Content → Shopping Experiences and open the layout of your product pages, or create a new one of the type “Product page”. - Insert the placeholder
Below the buy box, add a block with a text element, switch to the source code view and insert<div data-garantielabel></div>. - Load the script
Add the line withwidget.jsvia the theme (for example inbase.html.twig) or via a plugin for custom scripts, then save the layout and assign it to the products. - Alternative in the theme
Developers extend the buy box template (buy-widget.html.twig) in their own theme with the placeholder and load the script in the template head.
Things to know about Shopware 6
- From version 6.5, Shopware filters scripts in the text element (HTML sanitizer). This can only be switched off in self-hosted shops; in Shopware Cloud, the theme or a plugin remains the way to go.
- If you use your own Content Security Policy,
www.garantielabel.appmust be allowed for scripts, images and connections.
Where the notice belongs in Shopware 6
In Shopware, the product page is a Shopping Experience of the type “Product page”. By default, it contains the Buybox with the product image gallery and the product description. Elements such as “Product name & manufacturer logo” and Cross Selling are also available. You assign a layout in the product’s Layout tab. To make it the default for new product pages, use Layout assignment → Default layouts in the sidebar.
In the theme, the Buybox comes from the template buy-widget.html.twig, in Shopware 6.7 under storefront/component/buy-widget/. You create your own templates in a plugin or theme under Resources/views with the same folder structure and extend the original with sw_extends.
For the footer, select the “Entry point footer navigation” in the sales channel settings. In the standard theme, the level below supplies the headings and the level below that the links. Developers instead extend the template layout/footer/footer.html.twig and add the widget there with data-darstellung="link".
Variants, manufacturer product number and GARAN label
You create variants in the product’s Variants tab with the variant generator. First you need properties under Products → Properties. Variants inherit details such as name and description from the main product. The chain icon removes the inheritance for a variant.
Since Shopware 6.7.14 and 6.6.10.24, Shopware shows the GARAN label itself. The product has a “Guarantee (GARAN Label)” card with the “Producer guarantee duration in months” (30 to 600, in steps of 6) and the switch “Show label in Storefront”. The brand comes from the Manufacturer field, the model identifier from the “Manufacturer product number” in the General tab. If one of them is missing, Shopware shows no label. According to Shopware, the guarantee fields can be set on the main product and overridden per variant. If your variants have their own model identifiers, enter the manufacturer product number per variant.
The GARAN label then appears below the Buybox, in the cart, on the order confirmation page and in the order confirmation email. Shopware links the legal guarantee notice on the order confirmation page, next to the terms and conditions text. Shopware does not describe a display on the product page; there and in the footer, the widget adds the notice. If your shop uses the built-in GARAN label, leave out data-garan-voll and data-garan-klein in the widget, otherwise the label appears twice.
Typical pitfalls in Shopware
- Cache: After changing templates, clear the cache, for example with
bin/console cache:clear. The theme must be assigned to the right sales channel in the Theme tab. - Customised order email: The update only extended the order confirmation template if it had never been edited. According to Shopware, customised templates do not get the GARAN label and the notice link automatically.
- Overridden terms text: The link to the legal guarantee notice is switched on after the update (“Show legal guarantee notice on checkout page”). If you overrode the terms text of the order confirmation page in your theme, Shopware says you must adapt that override.
- Several sales channels: The legal guarantee notice setting can be overridden per sales channel. Check each channel separately.
Further sources
- Shopware: GARAN label and EU guarantee requirements
- Shopware changelog 6.6.10.24: EU harmonised guarantee label (GitHub)
- Shopware release 6.7.14.0 (GitHub)
- Shopware template buy-widget.html.twig (GitHub)
- Shopware docs: Shopping Experiences
- Shopware docs: Products
- Shopware docs: Sales channels
- Shopware developer docs: Customize templates
Legal guarantee notice in the order confirmation
According to the Commission’s guidelines, the notice should also appear in the confirmation email. In Shopware, you edit email templates under Settings → Email templates. The official graphic can be added as an image to the order confirmation template. A plain link is unlikely to count as a durable medium (CJEU, Case C-49/11, Content Services); the safest way is to put the notice directly in the email as an image, text or attachment. You will find the official files on our download page.
Producer guarantee? Then add the GARAN label
If the producer gives a commercial guarantee of durability of more than two years free of charge for the whole good, the GARAN label also belongs on the product page. With the GARAN label generator you create it in seconds from years, brand and model, your first three labels free and without sign-up. Below every finished label you get an embed code with permanent image URLs: you upload nothing and paste it into Shopware 6 as shown above.
Prefer your own files? Then upload the full and the nested version to the media library of Shopware 6 and enter the addresses in the widget code:
<div data-garantielabel
data-garan-voll="https://…/GARAN-MX-500.svg"
data-garan-klein="https://…/GARAN-MX-500-nested.svg"></div>The widget then shows the nested version below the legal guarantee notice, and one click opens the full GARAN label.
Frequently asked questions
Does this also work in Shopware 5?
Yes, via a Shopping World element or the template file of the detail page. However, Shopware 5 has not been supported since July 2024.
Do I have to do this for each product?
No. In the product page layout, the code applies to all products the layout is assigned to.
Does it interfere with the buy box?
No. The widget only draws inside its placeholder and changes nothing outside it.
Do I need the widget if Shopware already shows the GARAN label?
Not for the GARAN label. From Shopware 6.7.14 or 6.6.10.24, Shopware handles it itself. Shopware links the legal guarantee notice on the order confirmation page. For the product page and the footer, the widget remains useful, then without data-garan-….
Which field does Shopware use as the model identifier?
The manufacturer product number in the General tab. The brand comes from the Manufacturer field.
Why does Shopware show no GARAN label?
Shopware only shows it if “Show label in Storefront” is switched on and the guarantee duration, manufacturer and manufacturer product number are set.