custom/apps/TrustedShopsEasyIntegrationS6/Resources/views/storefront/component/product/card/box-standard.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/component/product/card/box-standard.html.twig' %}
  2. {% block component_product_box_name %}
  3.     {{ parent() }}
  4.     {% set tsConfig = config('trustedShopsApp.config') %}
  5.     {% set tsChannelId = context.salesChannel.id ?? null %}
  6.     {% set activeLanguageIsoCode = page.header.activeLanguage.translationCode.code ?? null %}
  7.     {% if activeLanguageIsoCode == null and cmsPage != null %}
  8.         {% set activeLanguageIsoCode = cmsPage.extensions.activeLanguage.locale.code %}
  9.     {% endif %}
  10.     {% set tsChannelRef = tsChannelId ~ '.' ~ activeLanguageIsoCode %}
  11.     {% if tsChannelId is not null %}
  12.         {% if expectedMapping is null %}
  13.             {% set expectedMapping = [] %}
  14.             {% foreach tsConfig.mappedChannels as mappedChannel %}
  15.                 {% set expectedMapping = expectedMapping|merge({ (mappedChannel.salesChannelRef): mappedChannel.eTrustedChannelRef}) %}
  16.             {% endforeach %}
  17.         {% endif %}
  18.         {% if tsConfig[tsChannelId][activeLanguageIsoCode].widgets is defined and expectedMapping[tsChannelRef] === tsConfig[tsChannelId][activeLanguageIsoCode].widgets.eTrustedChannelRef %}
  19.             {% if product.parentId and product.extensions.tsParentProduct is defined %}
  20.                 {% set product = product.extensions.tsParentProduct %}
  21.             {% endif %}
  22.             <div class="ts-rating" style="overflow: hidden">
  23.                 <!-- added by Trusted Shops app: Start -->
  24.                 {% sw_include '@Storefront/storefront/includes/widget-assembler.html.twig' with {
  25.                     widgets: tsConfig[tsChannelId][activeLanguageIsoCode].widgets.children.0.children,
  26.                     product: product,
  27.                     widgetLocationId: 'wdg-loc-pl'
  28.                 } %}
  29.                 <!-- End -->
  30.             </div>
  31.         {% endif %}
  32.     {% endif %}
  33. {% endblock %}