custom/plugins/S360Experts/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 element_product_listing_col %}
  3.     {# this option cannot be used with GrimmTheme, causes conflict with other plugins like list view #}
  4.     {% if config('S360Experts.config.showInListing') and not config('GrimmTheme') %} 
  5.         {% set config = config('S360Experts.config') %}
  6.         {% set showExpert = false %}
  7.         
  8.         {% if config.showInListing and page.hasExtension('s360_experts') %}
  9.             {% set showExpert = true %}
  10.         {% endif %}
  11.         {% set asProductTileInt = config.asProductTileInt %}
  12.         {% if config.asProductTileInt is same as(0) %}
  13.             {% set asProductTileInt = 1 %}
  14.         {% endif %}
  15.         {% set hasShownExpert = false %}
  16.         {% if page.getExtension('s360_experts_images').all is not empty %}
  17.             {% set s360ExpertsImages = searchMedia(page.getExtension('s360_experts_images').all, context.context) %}
  18.         {% endif %}
  19.         {% for product in searchResult %}
  20.             {% if showExpert and config.asProductTileInt is same as(0) and loop.index is same as(1) %}
  21.                 <div class="cms-listing-col {{ listingColumns }} s360-experts is--listing">
  22.                     {% sw_include '@Storefront/solution360/s360experts/category-product.html.twig' with { 'expert': page.getExtension('s360_experts').first() } %}
  23.                 </div>
  24.             {% endif %}
  25.             <div class="cms-listing-col {{ listingColumns }}">
  26.                 {% block element_product_listing_box %}
  27.                     {{ parent() }}
  28.                 {% endblock %}
  29.             </div>
  30.             {% if showExpert and asProductTileInt is same as (loop.index) and config.asProductTileInt is not same as(0) %}
  31.                 <div class="cms-listing-col {{ listingColumns }} s360-experts is--listing">
  32.                     {% sw_include '@Storefront/solution360/s360experts/category-product.html.twig' with { 'expert': page.getExtension('s360_experts').first() } %}
  33.                 </div>
  34.             {% endif %}
  35.             {% if showExpert and config.asProductTileInt > searchResult|length and loop.last is same as(true) %}
  36.                 <div class="cms-listing-col {{ listingColumns }} s360-experts is--listing">
  37.                     {% sw_include '@Storefront/solution360/s360experts/category-product.html.twig' with { 'expert': page.getExtension('s360_experts').first() } %}
  38.                 </div>
  39.             {% endif %}
  40.         {% endfor %}
  41.     {% else %}
  42.         {{ parent() }}
  43.     {% endif %}
  44. {% endblock %}