From 49e7942400b8f40ab3db780c77097260991aba58 Mon Sep 17 00:00:00 2001 From: Tejas Chari Date: Mon, 6 Nov 2023 20:53:03 +0530 Subject: [PATCH] refactor: added a filter button to expose an off canvas menu for the product filters --- templates/catalog/_partials/facets.tpl | 174 +++---------------- templates/catalog/_partials/products-top.tpl | 1 + 2 files changed, 27 insertions(+), 148 deletions(-) diff --git a/templates/catalog/_partials/facets.tpl b/templates/catalog/_partials/facets.tpl index 5e7c427..32f4f1f 100644 --- a/templates/catalog/_partials/facets.tpl +++ b/templates/catalog/_partials/facets.tpl @@ -23,27 +23,30 @@ * International Registered Trademark & Property of PrestaShop SA *} {if $facets|count} -
- {block name='facets_clearall_button'} - {if $activeFilters|count} - - {else} -
- - - - -
- {/if} - {/block} - -
+ {/if} - -{** - - {if !$facet.displayed} - {continue} - {/if} - -
-

{$facet.label}

- {assign var=_expand_id value=10|mt_rand:100000} - {assign var=_collapse value=true} - {foreach from=$facet.filters item="filter"} - {if $filter.active}{assign var=_collapse value=false}{/if} - {/foreach} - -
-

{$facet.label}

- - - - - - -
- - {if $facet.widgetType !== 'dropdown'} - {block name='facet_item_other'} -
    - {foreach from=$facet.filters key=filter_key item="filter"} - {if !$filter.displayed} - {continue} - {/if} - -
  • - -
  • - {/foreach} -
- {/block} - - {else} - - {block name='facet_item_dropdown'} - - {/block} - {/if} -
-*} diff --git a/templates/catalog/_partials/products-top.tpl b/templates/catalog/_partials/products-top.tpl index eb74cfa..459b49b 100644 --- a/templates/catalog/_partials/products-top.tpl +++ b/templates/catalog/_partials/products-top.tpl @@ -23,6 +23,7 @@ * International Registered Trademark & Property of PrestaShop SA *}
+ {if !empty($listing.rendered_facets)} {include file='catalog/_partials/facets.tpl'} {else}