custom/plugins/GrimmTheme/src/Resources/views/storefront/component/listing/filter-panel.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/component/listing/filter-panel.html.twig' %}
  2. {% block component_filter_panel_header %}
  3.     <div class="filter-panel-offcanvas-header">
  4.         <div class="h3 filter-panel-offcanvas-only">{{ "listing.filterTitleText"|trans }}</div>
  5.         <div
  6.             class="filter-panel-offcanvas-only filter-panel-offcanvas-close filter-panel-offcanvas-close--filter" data-offcanvas-sorting-filter-buttons="true">
  7.             {# <div class="filter-panel-offcanvas-only filter-panel-offcanvas-close js-offcanvas-close"> #}
  8.             {% sw_icon 'schliessen' style {'pack': 'grimmtheme', 'namespace': 'GrimmTheme', 'size': 'xs'} %}
  9.         </div>
  10.     </div>
  11. {% endblock %}
  12. {% block component_filter_panel_element %}
  13.     <div class="filter-panel{% if sidebar %} is--sidebar{% endif %}">
  14.         {% block component_filter_panel_items_container %}
  15.             <div class="filter-panel-items-container">
  16.                 {% block component_filter_panel_item_manufacturer %}
  17.                     {# @var manufacturers \Shopware\Core\Framework\DataAbstractionLayer\Search\AggregationResult\Metric\EntityResult #}
  18.                     {% set manufacturers = listing.aggregations.get('manufacturer') %}
  19.                     {% if not manufacturers.entities is empty %}
  20.                         {% set manufacturersSorted = manufacturers.entities|sort((a, b) => a.translated.name|lower <=> b.translated.name|lower) %}
  21.                         {% if manufacturersSorted|length > 1 %}
  22.                             {% sw_include '@Storefront/storefront/component/listing/filter/filter-multi-select.html.twig' with {
  23.                                 elements: manufacturersSorted,
  24.                                 sidebar: sidebar,
  25.                                 name: 'manufacturer',
  26.                                 displayName: 'listing.filterManufacturerDisplayName'|trans|sw_sanitize
  27.                             } %}
  28.                         {% endif %}
  29.                     {% endif %}
  30.                 {% endblock %}
  31.                 {% block component_filter_panel_item_price %}
  32.                     {% set price = listing.aggregations.get('price') %}
  33.                     {% if price.max > 0 %}
  34.                         {% sw_include '@Storefront/storefront/component/listing/filter/filter-range.html.twig' with {
  35.                             price: price,
  36.                             sidebar: sidebar,
  37.                             name: 'price',
  38.                             minKey: 'min-price',
  39.                             maxKey: 'max-price',
  40.                             displayName: 'listing.filterPriceDisplayName'|trans|sw_sanitize,
  41.                         } %}
  42.                     {% endif %}
  43.                 {% endblock %}
  44.                 {% block component_filter_panel_item_shipping_free %}
  45.                     {# block overwritten to change order: show measures before free shipping #}
  46.                     {# overwrite plugin logic #}
  47.                     {% block component_filter_panel_item_additional %}
  48.                         {# check if category custom field is set #}
  49.                         {% if page.header.navigation.active.customFields.custom_category_configuration_exclude_measures_filter == false %}
  50.                             {% set filters = config(constant('\\LoyxxAdditionalListingFilters\\Core\\Services\\ConfigService::CONFIG_DOMAIN') ~ 'availableFilterHandlers') %}
  51.                             {% if filters is not empty %}
  52.                                 {% set filtersExists = false %}
  53.                                 {% for filter in filters %}
  54.                                     {% if filter in listing.aggregations | keys %}
  55.                                         {% set filtersExists = true %}
  56.                                     {% endif %}
  57.                                 {% endfor %}
  58.                                 {% if filtersExists %}
  59.                                     {% sw_include '@Storefront/solution360/measurements-filter.html.twig' with {"filters" : filters} %}
  60.                                 {% endif %}
  61.                             {% endif %}
  62.                         {% endif %}
  63.                     {% endblock %}
  64.                     {% if 'freeShipping' not in config(constant('\\LoyxxAdditionalListingFilters\\Core\\Services\\ConfigService::CONFIG_DOMAIN') ~ 'hideStoreFilterHandlers') %}
  65.                         {% set shippingFree = listing.aggregations.get('shipping-free') %}
  66.                         {% if shippingFree.max > 0 %}
  67.                             {% sw_include '@Storefront/storefront/component/listing/filter/filter-boolean.html.twig' with {
  68.                                 name: 'shipping-free',
  69.                                 displayName: 'listing.filterFreeShippingDisplayName'|trans|sw_sanitize
  70.                             } %}
  71.                         {% endif %}
  72.                     {% endif %}
  73.                 {% endblock %}
  74.                 {% block component_filter_panel_item_properties %}
  75.                     {# @var properties \Shopware\Core\Framework\DataAbstractionLayer\Search\AggregationResult\Metric\EntityResult #}
  76.                     {% set properties = listing.aggregations.get('properties') %}
  77.                     {% if not properties.entities is empty %}
  78.                         {% for property in properties.entities %}
  79.                             {% if property.options|length > 1 %}
  80.                                 {% sw_include '@Storefront/storefront/component/listing/filter/filter-property-select.html.twig' with {
  81.                                     elements: property.options,
  82.                                     sidebar: sidebar,
  83.                                     name: 'properties',
  84.                                     displayName: property.translated.name,
  85.                                     displayType: property.displayType,
  86.                                     pluginSelector: 'filter-property-select',
  87.                                     propertyName: property.translated.name
  88.                                 } %}
  89.                             {% endif %}
  90.                         {% endfor %}
  91.                     {% endif %}
  92.                 {% endblock %}
  93.                 {% block component_filter_panel_item_rating_select %}
  94.                     {{ parent() }}
  95.                 {% endblock %}
  96.             </div>
  97.         {% endblock %}
  98.         {% block component_filter_panel_active_container %}
  99.             <div class="filter-panel-active-container">
  100.                 {% block component_filter_panel_active_container_inner %}{% endblock %}
  101.             </div>
  102.         {% endblock %}
  103.     </div>
  104.     <div class="d-lg-none panel-offcanvas__footer panel-offcanvas__footer--filter">{{ "listing.offcanvas.select"|trans|sw_sanitize }}</div>
  105. {% endblock %}