Rajout du tri par Position dans le frontOffice

This commit is contained in:
2022-01-23 11:23:14 +01:00
parent 08f1af5f96
commit 73bd26a96b
2 changed files with 18 additions and 31 deletions

View File

@@ -48,7 +48,7 @@
{$limit={$smarty.get.limit|default:8}}
{$product_page={$smarty.get.page|default:1}}
{$product_order={$smarty.get.order|default:'alpha'}}
{$product_order={$smarty.get.order|default:'manual'}}
{hook name="category.top" category="$category_id"}
@@ -84,12 +84,8 @@
{ifloop rel="subcategories"}
{loop name="subcategories" type="category" parent=$category_id}
<div id="category-products">
<hr>
<h3 id="main-label" class="page-header">{$TITLE}</h3>
<hr>
@@ -98,23 +94,14 @@
<div class="products-content">
<ul class="list-unstyled row">
{loop type="product" name="my_product_loop" category="{$ID}" depth="2" order="min_price"}
{include file="includes/single-product.html" product_id=$ID hasBtn=true hasDescription=false hasQuickView=false width="720" height="482"}
{/loop}
</ul>
</div>
</div>
{/loop}
{/ifloop}
{ifloop rel="product_list"}
{$amount={count type="product" category=$category_id}}
<div class="toolbar toolbar-top" role="toolbar">
@@ -122,7 +109,7 @@
<span class="sort-by">
<label for="sortby-top">{intl l="Sort By"}</label>
<select id="sortby-top" name="sortby">
{*<option value="{url path="{category attr="url"}" order="manual"}">{intl l="Position"}</option>*}
<option value="{url current="1" limit=$limit order="manual"}" {if $product_order=="manual"}selected{/if}>{intl l="Position"}</option>
<option value="{url current="1" limit=$limit order="alpha"}" {if $product_order=="alpha"}selected{/if}>{intl l="Name ascending"}</option>
<option value="{url current="1" limit=$limit order="alpha_reverse"}" {if $product_order=="alpha_reverse"}selected{/if}>{intl l="Name descending"}</option>
<option value="{url current="1" limit=$limit order="min_price"}" {if $product_order=="min_price"}selected{/if}>{intl l="Price ascending"}</option>

View File

@@ -18,7 +18,7 @@
<span class="sort-by">
<label for="sortby-top">{intl l="Sort By"}</label>
<select id="sortby-top" name="sortby">
{*<option value="{url path="{category attr="url"}" order="manual"}">{intl l="Position"}</option>*}
<option value="{url current="1" limit=$limit order="manual"}" {if $order=="manual"}selected{/if}>{intl l="Position"}</option>
<option value="{url current="1" limit=$limit order="alpha"}" {if $order=="alpha"}selected{/if}>{intl l="Name ascending"}</option>
<option value="{url current="1" limit=$limit order="alpha_reverse"}" {if $order=="alpha_reverse"}selected{/if}>{intl l="Name descending"}</option>
<option value="{url current="1" limit=$limit order="min_price"}" {if $order=="min_price"}selected{/if}>{intl l="Price ascending"}</option>