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 expectedMapping = [] %}
  5. {% foreach tsConfig.mappedChannels as mappedChannel %}
  6.     {% set expectedMapping = expectedMapping|merge({ (mappedChannel.salesChannelRef): mappedChannel.eTrustedChannelRef}) %}
  7. {% endforeach %}
  8. {% block base_body_script %}
  9.     {{ parent() }}
  10.     {% if tsConfig[tsChannelId].trustbadgeConfiguration is defined and expectedMapping[tsChannelId] === tsConfig[tsChannelId].trustbadgeConfiguration.eTrustedChannelRef %}
  11.         {% set tsTrustBadgeConfiguration = tsConfig[tsChannelId].trustbadgeConfiguration.children %}
  12.         {% sw_include '@Storefront/storefront/includes/script-assembler.html.twig' with {
  13.             scriptConfig: tsTrustBadgeConfiguration[0]
  14.         } %}
  15.     {% endif %}
  16. {% endblock %}
  17. {#
  18. {% block base_main_inner %}
  19.     {{ parent() }}
  20.     {% if tsChannelId is not null %}
  21.         {% if tsConfig[tsChannelId].productReviewActive is defined and tsConfig[tsChannelId].productReviewActive is not null %}
  22.             <!-- added by Trusted Shops app: Start -->
  23.             <div class="ts-margin-container container">
  24.                 <div class="row">
  25.                     <div class="col-12">
  26.                         {% sw_include '@Storefront/storefront/includes/widget-assembler.html.twig' with {
  27.                             widgets: tsConfig[tsChannelId].widgets.children.0.children,
  28.                             product: product,
  29.                             widgetLocationId: 'wdg-loc-lrm'
  30.                         } %}
  31.                     </div>
  32.                 </div>
  33.             </div>
  34.             <!-- End -->
  35.         {% endif %}
  36.     {% endif %}
  37. {% endblock %}#}