custom/apps/TrustedShopsEasyIntegrationS6/Resources/views/storefront/includes/widget-assembler.html.twig line 1

Open in your IDE?
  1. {% for widget in widgets %}
  2.     {% if
  3.         (whitelist is not defined or
  4.         (whitelist is defined and widget.applicationType in whitelist))
  5.         and
  6.         (blacklist is not defined or
  7.         (blacklist is defined and widget.applicationType not in blacklist))
  8.     %}
  9.         {% if widget.widgetLocation.id === widgetLocationId %}
  10.             {% set widgetTag = '<' ~ widget.tag ~ ' ' ~ widget.attributes.id.attributeName ~ '="'~ widget.attributes.id.value ~'"' %}
  11.             {% if widget.attributes.productIdentifier is defined %}
  12.                 {% if widget.attributes.productIdentifier.attributeName === "data-gtin" and product.ean is not null %}
  13.                     {% set widgetTag = widgetTag ~ ' ' ~ widget.attributes.productIdentifier.attributeName ~ '="'~ product.ean ~'"' %}
  14.                 {% elseif widget.attributes.productIdentifier.attributeName === "data-mpn" and product.manufacturerNumber is not null %}
  15.                     {% set widgetTag = widgetTag ~ ' ' ~ widget.attributes.productIdentifier.attributeName ~ '="'~ product.manufacturerNumber ~'"' %}
  16.                 {% else %}
  17.                     {% set widgetTag = widgetTag ~ 'data-sku="'~ product.productNumber ~'"' %}
  18.                 {% endif %}
  19.             {% endif %}
  20.             {% set widgetTag = widgetTag ~ '></' ~ widget.tag ~ '>' %}
  21.             {{ widgetTag|raw }}
  22.         {% endif %}
  23.     {% endif %}
  24. {% endfor %}