Skip to content
New: 3 GARAN labels for free, no sign-up neededCreate now
EU legal guarantee
and GARAN label
GuideUpdated 9 October 20266 min read

Add the legal guarantee notice to OXID eShop

The official EU legal guarantee notice in your OXID eShop in a few minutes, with the free widget.

In OXID eShop 7, you add the legal guarantee notice below the add-to-basket button with a template extension: in the Twig block details_productmain_tobasket of the APEX theme, via a small module or a child theme. A CMS page in the admin is not enough, because the editor removes scripts and there is no free CMS slot on the product page.

The code for OXID eShop

<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 OXID eShop

  1. Module or child theme
    The extension belongs in a small module or a child theme (in theme.php with 'parentTheme' => 'apex') so that updates of the APEX theme do not overwrite it. You activate it under Extensions → Modules or Extensions → Themes. You need file access for this; usually your agency takes care of it.
  2. Extend the block
    Extend the template page/details/inc/productmain.html.twig and paste the widget code in the block details_productmain_tobasket after {{ parent() }}. With parent(), the add-to-basket button stays unchanged.
  3. GARAN label per product
    For your own GARAN labels, create two attributes under Administer Products → Attributes, for example “GARAN full” and “GARAN small”, and enter the addresses of the two files on the product under Selection → Assign Attributes. In the template, output the values in data-garan-voll and data-garan-klein.
  4. Clear the cache
    Clear the template cache with vendor/bin/oe-console oe:cache:clear and check the product page, including variants.

In a module, the file is located at views/twig/extensions/themes/apex/page/details/inc/productmain.html.twig and looks like this:

{% extends 'page/details/inc/productmain.html.twig' %}

{% block details_productmain_tobasket %}
  {{ parent() }}
  <div data-garantielabel></div>
  <script src="https://www.garantielabel.app/widget.js" async></script>
{% endblock %}

Things to know about OXID eShop

Where exactly the notice belongs in OXID eShop

On the product page, the notice sits in the block details_productmain_tobasket, as described above. When customers choose another variant, APEX reloads the area details_container and replaces it with freshly rendered HTML. The theme runs any scripts it contains again. So your block extension is back on the page after the variant change too.

For a notice on every page, extend the template layout/footer.html.twig. In the APEX theme, it contains, among others, the block dd_footer_copyright. It outputs the content of the CMS page with the ident oxstdfooter. In a module, your file is located at views/twig/extensions/themes/apex/layout/footer.html.twig:

{% extends 'layout/footer.html.twig' %}

{% block dd_footer_copyright %}
  {{ parent() }}
  <div data-garantielabel></div>
  <script src="https://www.garantielabel.app/widget.js" async></script>
{% endblock %}

Keep maintaining the footer text itself in the CMS page. The placeholder, however, belongs in the template, for the same reason as above: the editor removes scripts. The template applies to all shop languages. The widget picks the language of the notice from the language setting of the page, which APEX sets from the active shop language.

Variants and model identifier for the GARAN label

In OXID, you first create a parent product. According to the user documentation, it contains all the basic information that is inherited by the variants. You maintain the variants in the Variants tab. There you can enter, among other things, a different product number, price and stock from the parent product. The parent product’s long description is displayed for all variants unless a variant has its own.

Manufacturer and manufacturer’s part number (MPN) are on the Main tab. You select the manufacturer from a list that you maintain under Master Settings ‣ Brands/Manufacturers. According to the documentation, the edit view of a variant is almost identical to that of a regular product.

A GARAN label applies to one model identifier. If all variants share the same one, the label on the parent product is enough. If variants are separate models, each model needs its own label. After setting up, check in the live shop whether your template shows the label of the selected variant or that of the parent product when the variant changes.

Typical pitfalls in OXID eShop

Further sources

According to the Commission’s guidelines, the notice should also appear in the confirmation email. The order confirmation uses the CMS page with the ident oxuserorderemail, which you edit under Customer Info → CMS Pages. JavaScript does not run in emails, so add the official graphic there as an image. 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.

Sources

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 OXID eShop as shown above.

Prefer your own files? Then upload the full and the nested version to the media library of OXID eShop 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

Can I simply paste the code into a CMS page?

Not reliably. The editor removes the script, and there is no standard slot on the product page where a CMS page appears automatically. A small template extension is the safe way.

Do I have to change the APEX theme itself?

No. A module or child theme with {{ parent() }} is enough. The original theme stays updatable, and the buy button stays as it is.

Where do I enter the GARAN label per product?

For example as an attribute value on the product under Selection → Assign Attributes. The template then reads the addresses and passes them to the widget.

How do I show the notice on every page in OXID eShop?

In your module or child theme, extend the template layout/footer.html.twig, in the APEX theme for example the block dd_footer_copyright. Paste the widget code there after {{ parent() }}.

Does the notice stay when the variant changes?

Yes, if it is in the block details_productmain_tobasket. When the variant changes, APEX reloads the whole details area, including your block extension, and runs the scripts it contains again.

Do I have to activate the module in every subshop?

According to the developer documentation, you activate it for a subshop with the option --shop-id. Then check each subshop in the live shop.

GARAN label done, for free.

Your first 3 labels are free. On Shopify, our app adds both EU labels automatically.