templates/frontend-eforum/_partials/modules/mostBought.html.twig line 1

Open in your IDE?
  1. {% if mostBought is not empty or productsInCategory is not empty %}
  2.     <section class="product-list product-list--product {% if isProductPage is defined %}recommended-products{% endif %}">
  3.         <div class="container">
  4.             {% if module.title is defined %}
  5.                 <header class="product-list__header">
  6.                     <h2 class="product-list__heading">{{ module.title }}</h2>
  7.                 </header>
  8.             {% endif %}
  9.             <div class="row">
  10.                 <div
  11.                     class=" {% if isProductPage is defined %}
  12.                                 product-list__slider
  13.                                 product-list__slider-product-page
  14.                             {% else %}
  15.                                 product-list__slider
  16.                             {% endif %}"
  17.                     data-sliderRecommended
  18.                 >
  19.                     {% if module.extraProducts is defined and module.extraProducts is not empty %}
  20.                         {% set mostBought = module.extraProducts|merge(mostBought) %}
  21.                         {% for product in mostBought %}
  22.                             {% include "frontend-eforum/_partials/product-box.html.twig" with {product: product, 'kcShortDesc': true} %}
  23.                         {% endfor %}
  24.                     {% else %}
  25.                         {% if productsInCategory == null %}
  26.                             {% for product in mostBought %}
  27.                                 {% include "frontend-eforum/_partials/product-box.html.twig" with {product: product, 'kcShortDesc': true} %}
  28.                             {% endfor %}
  29.                         {% else  %}
  30.                             {% for product in productsInCategory %}
  31.                                 {% include "frontend-eforum/_partials/product-box.html.twig" with {product: product, 'kcShortDesc': true} %}
  32.                             {% endfor %}
  33.                         {% endif %}
  34.                     {% endif %}
  35.                 </div>
  36.             </div>
  37.         </div>
  38.     </section>
  39. {% endif %}