custom/plugins/clerkio64/src/Resources/views/storefront/component/product/listing.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/component/product/listing.html.twig' %}
  2. {% block product_listing %}
  3.     {% if config('clerkio64.config.categoryRecommendationsEnabled') == 'true' and not page.searchTerm %}
  4.         {% set contents = config('clerkio64.config.categoryRecommendationsContent') | split(',') %}
  5.         {% if config('clerkio64.config.categoryRecommendationsFilterDuplicates') == '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-category="{{ page.navigationId }}"></span>
  15.                 {% if loop.first == false %}
  16.                     {% set excludeString = excludeString ~ ', ' %}
  17.                 {% endif %}
  18.                 {% set excludeString = excludeString ~ '.clerk_' ~ loop.index0 %}
  19.             {% endfor %}
  20.         {% else %}
  21.             {% for content in contents %}
  22.                 <span class="clerk" data-template="@{{ content | replace({' ': ''}) }}"
  23.                       data-category="{{ page.navigationId }}"></span>
  24.             {% endfor %}
  25.         {% endif %}
  26.     {% endif %}
  27.     {{ parent() }}
  28. {% endblock %}