Change filters, product lists, ...

This commit is contained in:
Roman Pyrih
2025-09-30 15:02:46 +02:00
parent 865d89efe1
commit c02b904f54
11 changed files with 365 additions and 199 deletions

View File

@@ -23,7 +23,8 @@
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
*}
{capture assign="productClasses"}{if !empty($productClass)}{$productClass}{else}col-xs-12 col-sm-6 col-xl-4{/if}{/capture}
{* {capture assign="productClasses"}{if !empty($productClass)}{$productClass}{else}col-xs-12 col-sm-6 col-xl-4{/if}{/capture} *}
{capture assign="productClasses"}col-xs-12 col-sm-6 col-lg-4 col-xl-3{/capture}
<div class="products{if !empty($cssClass)} {$cssClass}{/if}">
{foreach from=$products item="product" key="position"}

View File

@@ -23,14 +23,16 @@
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
*}
<div id="js-product-list-top" class="row products-selection">
<div class="col-md-6 hidden-sm-down total-products">
<div class="col-md-4 hidden-sm-down total-products">
{if $listing.pagination.total_items > 1}
<p>{l s='There are %product_count% products.' d='Shop.Theme.Catalog' sprintf=['%product_count%' => $listing.pagination.total_items]}</p>
<p>
{l s='There are %product_count% products.' d='Shop.Theme.Catalog' sprintf=['%product_count%' => $listing.pagination.total_items]}
</p>
{elseif $listing.pagination.total_items > 0}
<p>{l s='There is 1 product.' d='Shop.Theme.Catalog'}</p>
{/if}
</div>
<div class="col-md-6">
<div class="col-md-8">
<div class="row sort-by-row">
{block name='sort_by'}
@@ -53,4 +55,4 @@
'%total%' => $listing.pagination.total_items
]}
</div>
</div>
</div>

View File

@@ -35,4 +35,4 @@
<i class="material-icons">&#xE316;</i>
</a>
</div>
</div>
</div>

View File

@@ -25,25 +25,31 @@
<span class="hidden-sm-down sort-by">{l s='Sort by:' d='Shop.Theme.Global'}</span>
<div class="products-sort-order dropdown">
<button
class="btn-unstyle select-title"
rel="nofollow"
data-toggle="dropdown"
aria-label="{l s='Sort by selection' d='Shop.Theme.Global'}"
aria-haspopup="true"
aria-expanded="false">
<button class="btn-unstyle select-title" rel="nofollow" data-toggle="dropdown"
aria-label="{l s='Sort by selection' d='Shop.Theme.Global'}" aria-haspopup="true" aria-expanded="false">
{if $listing.sort_selected}{$listing.sort_selected}{else}{l s='Select' d='Shop.Theme.Actions'}{/if}
<i class="material-icons float-xs-right">&#xE5C5;</i>
</button>
<div class="dropdown-menu">
{foreach from=$listing.sort_orders item=sort_order}
<a
rel="nofollow"
href="{$sort_order.url}"
class="select-list {['current' => $sort_order.current, 'js-search-link' => true]|classnames}"
>
{$sort_order.label}
</a>
{if $sort_order.label == "Reference, A to Z"
|| $sort_order.label == "Reference, Z to A"
|| $sort_order.label == "Nazwa, A do Z"
|| $sort_order.label == "Nazwa, Z do A"}
{continue}
{/if}
{assign var="label" value=$sort_order.label}
{if $label == "Sprzedaż, od najwyższej do najniższej"}
{assign var="label" value="Popularność"}
{/if}
<a rel="nofollow" href="{$sort_order.url}"
class="select-list {['current' => $sort_order.current, 'js-search-link' => true]|classnames}">
{$label}
</a>
{/foreach}
</div>
</div>
</div>