custom/apps/TrustedShopsEasyIntegrationS6/Resources/views/storefront/base.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/base.html.twig' %}
  2. {% set tsConfig = config('trustedShopsApp.config') %}
  3. {% set tsChannelId = context.salesChannel.id ?? null %}
  4. {% set activeLanguageIsoCode = page.header.activeLanguage.translationCode.code ?? null %}
  5. {% set tsChannelRef = tsChannelId ~ '.' ~ activeLanguageIsoCode %}
  6. {% set expectedMapping = [] %}
  7. {% foreach tsConfig.mappedChannels as mappedChannel %}
  8.     {% set expectedMapping = expectedMapping|merge({ (mappedChannel.salesChannelRef): mappedChannel.eTrustedChannelRef}) %}
  9. {% endforeach %}
  10. {% block base_body_script %}
  11.     {{ parent() }}
  12.     {% if tsConfig[tsChannelId][activeLanguageIsoCode].trustbadgeConfiguration is defined and expectedMapping[tsChannelRef] === tsConfig[tsChannelId][activeLanguageIsoCode].trustbadgeConfiguration.eTrustedChannelRef %}
  13.         {% set tsTrustBadgeConfiguration = tsConfig[tsChannelId][activeLanguageIsoCode].trustbadgeConfiguration.children %}
  14.         {% sw_include '@Storefront/storefront/includes/script-assembler.html.twig' with {
  15.             scriptConfig: tsTrustBadgeConfiguration[0]
  16.         } %}
  17.     {% endif %}
  18. {% endblock %}
  19. {#
  20. {% block base_main_inner %}
  21.     {{ parent() }}
  22.     {% if tsChannelId is not null %}
  23.         {% if tsConfig[tsChannelId].productReviewActive is defined and tsConfig[tsChannelId].productReviewActive is not null %}
  24.             <!-- added by Trusted Shops app: Start -->
  25.             <div class="ts-margin-container container">
  26.                 <div class="row">
  27.                     <div class="col-12">
  28.                         {% sw_include '@Storefront/storefront/includes/widget-assembler.html.twig' with {
  29.                             widgets: tsConfig[tsChannelId].widgets.children.0.children,
  30.                             product: product,
  31.                             widgetLocationId: 'wdg-loc-lrm'
  32.                         } %}
  33.                     </div>
  34.                 </div>
  35.             </div>
  36.             <!-- End -->
  37.         {% endif %}
  38.     {% endif %}
  39. {% endblock %}#}