custom/plugins/IeaMedical/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. {% set currentPage = ((searchResult.criteria.offset + 1) / searchResult.criteria.limit )|round(0, 'ceil') %}
  3. {% set paginationConfig = { page: currentPage }|json_encode %}
  4. {% if disableEmptyFilter is not defined %}
  5.     {% set disableEmptyFilter = config('core.listing.disableEmptyFilterOptions') %}
  6. {% endif %}
  7. {% set listingPagination = {
  8.     sidebar: sidebar,
  9.     params: params,
  10.     dataUrl: dataUrl,
  11.     filterUrl: filterUrl,
  12.     disableEmptyFilter: disableEmptyFilter,
  13.     snippets: {
  14.         resetAllButtonText: 'listing.filterPanelResetAll'|trans|sw_sanitize
  15.     }
  16. } %}
  17. {% block product_listing %}
  18.     <div class="cms-element-product-listing-wrapper"
  19.          data-listing-pagination="true"
  20.          data-listing-pagination-options='{{ paginationConfig }}'
  21.          data-listing="true"
  22.          data-listing-options='{{ listingPagination|json_encode }}'>
  23.         {% block element_product_listing_wrapper_content %}
  24.             <div class="cms-element-product-listing">
  25.                 {% if searchResult.total > 0 %}
  26.                     {% block element_product_listing_pagination_nav_actions %}
  27.                         <div class="cms-element-product-listing-actions row justify-content-between">
  28.                             <div class="col-md-auto">
  29.                                 {% block element_product_listing_pagination_nav_top %}
  30.                                     {% sw_include '@Storefront/storefront/component/pagination.html.twig' with {
  31.                                         entities: searchResult,
  32.                                         criteria: searchResult.criteria
  33.                                     } %}
  34.                                 {% endblock %}
  35.                             </div>
  36.                             <div class="col-md-auto">
  37.                                 {% block element_product_listing_sorting %}
  38.                                     <span class="sort-by-label">Sort by:</span>
  39.                                     {% sw_include '@Storefront/storefront/component/sorting.html.twig' with {
  40.                                         current: searchResult.sorting,
  41.                                         sortings: searchResult.availableSortings
  42.                                     } %}
  43.                                 {% endblock %}
  44.                             </div>
  45.                             <div class="product-fileter-js">
  46.                             </div>
  47.                         </div>
  48.                     {% endblock %}
  49.                 {% endif %}
  50.                 {% block element_product_listing_row %}
  51.                     <div class="row cms-listing-row js-listing-wrapper">
  52.                         {% if searchResult.total > 0 %}
  53.                             {% block element_product_listing_col %}
  54.                                 {% for product in searchResult %}
  55.                                     <div class="cms-listing-col {{ listingColumns }}">
  56.                                         {% block element_product_listing_box %}
  57.                                             {% sw_include '@Storefront/storefront/component/product/card/box.html.twig' with {
  58.                                                 'layout': boxLayout,
  59.                                                 'displayMode': displayMode
  60.                                             } %}
  61.                                         {% endblock %}
  62.                                     </div>
  63.                                 {% endfor %}
  64.                             {% endblock %}
  65.                         {% else %}
  66.                             {% block element_product_listing_col_empty %}
  67.                                 <div class="cms-listing-col col-12">
  68.                                     {% block element_product_listing_col_empty_alert %}
  69.                                         {% sw_include '@Storefront/storefront/utilities/alert.html.twig' with {
  70.                                             type: 'info',
  71.                                             content: 'listing.emptyResultMessage'|trans|sw_sanitize
  72.                                         } %}
  73.                                     {% endblock %}
  74.                                 </div>
  75.                             {% endblock %}
  76.                         {% endif %}
  77.                     </div>
  78.                 {% endblock %}
  79.                 {% if searchResult.total > searchResult.limit %}
  80.                     {% block element_product_listing_pagination_nav_bottom %}
  81.                         {% sw_include '@Storefront/storefront/component/pagination.html.twig' with {
  82.                             entities: searchResult,
  83.                             criteria: searchResult.criteria,
  84.                             paginationLocation: 'bottom',
  85.                         } %}
  86.                     {% endblock %}
  87.                 {% endif %}
  88.             </div>
  89.         {% endblock %}
  90.     </div>
  91. {% endblock %}