Skip to content

Commit

Permalink
Correct the changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Radomir98 committed Oct 4, 2024
1 parent d8051e6 commit a003f71
Showing 1 changed file with 47 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,53 +9,54 @@
{% set filters = slot.data.listing.criteria.extensions.nostoFilters.filters %}
{% endif %}

{% block component_filter_panel_item_test_filter %}
{% if filters %}
{% for filter in filters %}
{% if filter is instanceof("\\Nosto\\NostoIntegration\\Search\\Response\\GraphQL\\Filter\\LabelTextFilter") %}
{% sw_include '@Storefront/storefront/component/listing/filter/filter-property-select.html.twig' with {
elements: filter.values,
sidebar: sidebar,
name: filter.id,
displayName: filter.name,
displayType: 'text',
pluginSelector: 'filter-property-select',
propertyName: filter.name
} %}
{% endif %}
<div class="filter-panel-items-container">
{% block component_filter_panel_item_test_filter %}
{% if filters %}
{% for filter in filters %}
{% if filter is instanceof("\\Nosto\\NostoIntegration\\Search\\Response\\GraphQL\\Filter\\LabelTextFilter") %}
{% sw_include '@Storefront/storefront/component/listing/filter/filter-property-select.html.twig' with {
elements: filter.values,
sidebar: sidebar,
name: filter.id,
displayName: filter.name,
displayType: 'text',
pluginSelector: 'filter-property-select',
propertyName: filter.name
} %}
{% endif %}

{% if filter is instanceof("\\Nosto\\NostoIntegration\\Search\\Response\\GraphQL\\Filter\\RangeSliderFilter") %}
{% sw_include '@Storefront/storefront/component/listing/filter/filter-range.html.twig' with {
sidebar: sidebar,
name: filter.id,
minKey: filter.minKey,
maxKey: filter.maxKey,
lowerBound: 0,
displayName: filter.name,
minInputValue: filter.min,
maxInputValue: filter.max,
propertyName: filter.name
} %}
{% endif %}
{% if filter is instanceof("\\Nosto\\NostoIntegration\\Search\\Response\\GraphQL\\Filter\\RangeSliderFilter") %}
{% sw_include '@Storefront/storefront/component/listing/filter/filter-range.html.twig' with {
sidebar: sidebar,
name: filter.id,
minKey: filter.minKey,
maxKey: filter.maxKey,
lowerBound: 0,
displayName: filter.name,
minInputValue: filter.min,
maxInputValue: filter.max,
propertyName: filter.name
} %}
{% endif %}

{% if filter is instanceof("\\Nosto\\NostoIntegration\\Search\\Response\\GraphQL\\Filter\\RatingFilter") %}
{% sw_include '@Storefront/storefront/component/listing/filter/filter-rating-select.html.twig' with {
elements: filter.values,
maxPoints: filter.maxPoints,
sidebar: sidebar,
name: filter.id,
hidden: filter.hidden,
displayName: filter.name,
pluginSelector: 'filter-rating-select',
propertyName: filter.name
} %}
{% endif %}
{% endfor %}
{% endif %}
{% endblock %}

{% if not filters %}
{{ parent() }}
{% endif %}
{% if filter is instanceof("\\Nosto\\NostoIntegration\\Search\\Response\\GraphQL\\Filter\\RatingFilter") %}
{% sw_include '@Storefront/storefront/component/listing/filter/filter-rating-select.html.twig' with {
elements: filter.values,
maxPoints: filter.maxPoints,
sidebar: sidebar,
name: filter.id,
hidden: filter.hidden,
displayName: filter.name,
pluginSelector: 'filter-rating-select',
propertyName: filter.name
} %}
{% endif %}
{% endfor %}
{% endif %}
{% endblock %}

{% if not filters %}
{{ parent() }}
{% endif %}
</div>
{% endblock %}

0 comments on commit a003f71

Please sign in to comment.