From c02b904f546b12a9f781e73bd3e3651c66f52b99 Mon Sep 17 00:00:00 2001 From: Roman Pyrih Date: Tue, 30 Sep 2025 15:02:46 +0200 Subject: [PATCH] Change filters, product lists, ... --- .../front/catalog/active-filters.tpl | 16 +- .../views/templates/front/catalog/facets.tpl | 143 ++++++++++-------- themes/classic/assets/css/custom.css | 2 +- themes/classic/assets/css/custom.css.map | 2 +- themes/classic/assets/css/custom.scss | 116 ++++++++++---- themes/classic/assets/js/custom.js | 137 ++++++++++++----- .../catalog/_partials/productlist.tpl | 3 +- .../catalog/_partials/products-top.tpl | 10 +- .../templates/catalog/_partials/products.tpl | 2 +- .../catalog/_partials/sort-orders.tpl | 36 +++-- .../catalog/listing/product-list.tpl | 97 ++++++------ 11 files changed, 365 insertions(+), 199 deletions(-) diff --git a/modules/ps_facetedsearch/views/templates/front/catalog/active-filters.tpl b/modules/ps_facetedsearch/views/templates/front/catalog/active-filters.tpl index 835e7711..994e8177 100644 --- a/modules/ps_facetedsearch/views/templates/front/catalog/active-filters.tpl +++ b/modules/ps_facetedsearch/views/templates/front/catalog/active-filters.tpl @@ -18,11 +18,23 @@ *}
{block name='active_filters_title'} -

{l s='Active filters' d='Shop.Theme.Global'}

+

+ {l s='Active filters' d='Shop.Theme.Global'}

{/block} + {if $activeFilters|count} {/if} -
+ \ No newline at end of file diff --git a/modules/ps_facetedsearch/views/templates/front/catalog/facets.tpl b/modules/ps_facetedsearch/views/templates/front/catalog/facets.tpl index eece7339..09a3809f 100644 --- a/modules/ps_facetedsearch/views/templates/front/catalog/facets.tpl +++ b/modules/ps_facetedsearch/views/templates/front/catalog/facets.tpl @@ -20,17 +20,10 @@
{block name='facets_title'} -

{l s='Filter By' d='Shop.Theme.Actions'}

- {/block} - {block name='facets_clearall_button'} - {if $activeFilters|count} -
- -
- {/if} +

+ {l s='Filter By' d='Shop.Theme.Actions'} + {* *} +

{/block}
@@ -44,7 +37,8 @@ {if $filter.active}{assign var=_collapse value=false}{/if} {/foreach} -
+

{$facet.label}

@@ -55,49 +49,85 @@ {if in_array($facet.widgetType, ['radio', 'checkbox'])} {block name='facet_item_other'} + {/block} {elseif $facet.widgetType == 'dropdown'} @@ -126,11 +156,7 @@ \ No newline at end of file diff --git a/themes/classic/templates/catalog/listing/product-list.tpl b/themes/classic/templates/catalog/listing/product-list.tpl index 52f7ccb5..45ddcbfc 100644 --- a/themes/classic/templates/catalog/listing/product-list.tpl +++ b/themes/classic/templates/catalog/listing/product-list.tpl @@ -40,66 +40,73 @@ {include file='catalog/_partials/subcategories.tpl' subcategories=$subcategories} {/if} {/block} - + {hook h="displayHeaderCategory"} - {* Start - Custom *} - {hook h="displayLeftColumn"} - {* End - Custom *} +
+ +
+
+ {if $listing.products|count} -
- {if $listing.products|count} + {block name='product_list_top'} + {include file='catalog/_partials/products-top.tpl' listing=$listing} + {/block} - {block name='product_list_top'} - {include file='catalog/_partials/products-top.tpl' listing=$listing} - {/block} + {block name='product_list_active_filters'} +
+ {$listing.rendered_active_filters nofilter} +
+ {/block} - {block name='product_list_active_filters'} -
- {$listing.rendered_active_filters nofilter} -
- {/block} + {block name='product_list'} + {include file='catalog/_partials/products.tpl' listing=$listing productClass="col-xs-12 col-sm-6 col-lg-4 col-xl-3"} + {/block} - {block name='product_list'} - {include file='catalog/_partials/products.tpl' listing=$listing productClass="col-xs-12 col-sm-6 col-lg-4 col-xl-3"} - {/block} + {block name='product_list_bottom'} + {include file='catalog/_partials/products-bottom.tpl' listing=$listing} + {/block} - {block name='product_list_bottom'} - {include file='catalog/_partials/products-bottom.tpl' listing=$listing} - {/block} + {else} +
- {else} -
+
+ {capture assign="errorContent"} +

{l s='No products available yet' d='Shop.Theme.Catalog'}

+

{l s='Stay tuned! More products will be shown here as they are added.' d='Shop.Theme.Catalog'}

+ {/capture} -
- {capture assign="errorContent"} -

{l s='No products available yet' d='Shop.Theme.Catalog'}

-

{l s='Stay tuned! More products will be shown here as they are added.' d='Shop.Theme.Catalog'}

- {/capture} + {include file='errors/not-found.tpl' errorContent=$errorContent} +
- {include file='errors/not-found.tpl' errorContent=$errorContent} -
- -
- {/if} -
+
+ {/if} +
+
+
{if $category.description}
{if $listing.pagination.items_shown_from == 1} -
-

{$category.name}

-
- {if $category.description} -
{$category.description nofilter}
- {/if} - {if !empty($category.image.large.url)} -
- {if !empty($category.image.legend)}{$category.image.legend}{else}{$category.name}{/if} -
- {/if} +
+

{$category.name}

+
+ {if $category.description} +
{$category.description nofilter}
+ {/if} + {if !empty($category.image.large.url)} +
+ {if !empty($category.image.legend)}{$category.image.legend}{else}{$category.name}{/if}
+ {/if}
+
{/if}
{/if} @@ -108,4 +115,4 @@ {hook h="displayFooterCategory"} -{/block} +{/block} \ No newline at end of file