{% sw_extends '@Storefront/storefront/component/product/card/box-standard.html.twig' %}
{% block component_product_box_name %}
{{ parent() }}
{% set tsConfig = config('trustedShopsApp.config') %}
{% set tsChannelId = context.salesChannel.id ?? null %}
{% if tsChannelId is not null %}
{% if expectedMapping is null %}
{% set expectedMapping = [] %}
{% foreach tsConfig.mappedChannels as mappedChannel %}
{% set expectedMapping = expectedMapping|merge({ (mappedChannel.salesChannelRef): mappedChannel.eTrustedChannelRef}) %}
{% endforeach %}
{% endif %}
{% if tsConfig[tsChannelId].widgets is defined and expectedMapping[tsChannelId] === tsConfig[tsChannelId].widgets.eTrustedChannelRef %}
{% if product.parentId and product.extensions.tsParentProduct is defined %}
{% set product = product.extensions.tsParentProduct %}
{% endif %}
<div class="ts-rating" style="overflow: hidden">
<!-- added by Trusted Shops app: Start -->
{% sw_include '@Storefront/storefront/includes/widget-assembler.html.twig' with {
widgets: tsConfig[tsChannelId].widgets.children.0.children,
product: product,
widgetLocationId: 'wdg-loc-pl'
} %}
<!-- End -->
</div>
{% endif %}
{% endif %}
{% endblock %}