templates/product/listing_content.html.twig line 58

Open in your IDE?
  1. {# @var productListing \Pimcore\Bundle\EcommerceFrameworkBundle\IndexService\ProductList\ProductListInterface #}
  2. {# @var result Knp\Component\Pager\Pagination\SlidingPagination #}
  3. {# @var item \App\Model\Product\Car #}
  4. {# @var filterService \Pimcore\Bundle\EcommerceFrameworkBundle\FilterService\FilterService #}
  5. {# @var filterDefinition \Pimcore\Model\DataObject\FilterDefinition #}
  6. {% if(category) %}
  7.     <div class="page-header">
  8.         <h1>{{ category.name }}</h1>
  9.     </div>
  10. {% endif %}
  11. <div class="album bg-light">
  12.     <div class="container">
  13.         <div class="row">
  14.             <div class="col-md-3">
  15.                 {% if( pimcore_device().isPhone ) %}
  16.                 <div id="filter-container" class="card mb-4">
  17.                     <div class="card-header">
  18.                         <a id="filter-head" href="#" class="text-dark text-decoration-none" data-toggle="collapse" data-target="#filter-container-content" aria-expanded="true" aria-controls="filter-container-content">
  19.                             {{ 'filter.title' | trans }}
  20.                         </a>
  21.                     </div>
  22.                     <div id="filter-container-content" class="card-body collapse" aria-labelledby="filter-head" data-parent="#filter-container">
  23.                         {% endif %}
  24.                         <form id="js_filterfield">
  25.                             {% if(filterDefinition.filters|length > 0) %}
  26.                                 {% for filter in filterDefinition.filters %}
  27.                                     {% set filterMarkup = filterService.filterFrontend(filter, productListing, currentFilter) %}
  28.                                     {{ filterMarkup | raw  }}
  29.                                 {% endfor %}
  30.                             {% endif %}
  31.                         </form>
  32.                         {% if( pimcore_device().isPhone ) %}
  33.                     </div></div>
  34.                 {% endif %}
  35.             </div>
  36.             <div class="col-md-9">
  37.                 <div class="row">
  38.                     {%  for item in results %}
  39.                         <div class="col-md-4 d-flex align-items-stretch flex-column">
  40.                             {% include 'product/product_teaser.html.twig' with {'product': item} %}
  41.                         </div>
  42.                     {% endfor %}
  43.                 </div>
  44.             </div>
  45.         </div>
  46.         <div class="pt-5">
  47.             {% include 'includes/pagination.html.twig' %}
  48.         </div>
  49.     </div>
  50. </div>
  51. {% do pimcore_inline_script().appendScript("
  52.     $('#js_filterfield .custom-checkbox input, #js_filterfield .custom-radio input').on('change', function() {
  53.         $('#js_filterfield').submit();
  54.     });
  55. ") %}