custom/plugins/clerkio64/src/Resources/views/storefront/page/product-detail/index.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/page/product-detail/index.html.twig' %}
  2. {% block page_product_detail_cross_selling %}
  3.     {% if config('clerkio64.config.productRecommendationsEnabled') == 'true' and config('clerkio64.config.productRecommendationsLocation') == 'cross' %}
  4.         {% set contents = config('clerkio64.config.productRecommendationsContent') | split(',') %}
  5.         {% if config('clerkio64.config.productRecommendationsFilterDuplicates') == 'true' %}
  6.             {% set excludeString = '' %}
  7.             {% for content in contents %}
  8.                 <span
  9.                         class="clerk {{ 'clerk_' ~ loop.index0 }}"
  10.                         data-template="@{{ content | replace({' ': ''}) }}"
  11.                 {% if loop.first == false %}
  12.                     data-exclude-from="{{ excludeString }}"
  13.                 {% endif %}
  14.                 {# data-products='["{{ page.product.parentId ? page.product.parentId : page.product.id }}"]'></span> #}
  15.                 data-products='["{{ page.product.id }}"]'></span>
  16.                 {% if loop.first == false %}
  17.                     {% set excludeString = excludeString ~ ', ' %}
  18.                 {% endif %}
  19.                 {% set excludeString = excludeString ~ '.clerk_' ~ loop.index0 %}
  20.             {% endfor %}
  21.         {% else %}
  22.             {% for content in contents %}
  23.                 <span class="clerk" data-template="@{{ content | replace({' ': ''}) }}"
  24.                      {#  data-products='["{{ page.product.parentId ? page.product.parentId : page.product.id }}"]'></span> #}
  25.                 data-products='["{{ page.product.id }}"]'></span>
  26.             {% endfor %}
  27.         {% endif %}
  28.     {% else %}
  29.         {{ parent() }}
  30.     {% endif %}
  31. {% endblock %}