Fix sorting "news"
This commit is contained in:
@@ -30,7 +30,13 @@
|
||||
data-toggle="dropdown"
|
||||
aria-haspopup="true"
|
||||
aria-expanded="false">
|
||||
{if isset($listing.sort_selected)}{$listing.sort_selected}{else}{l s='Select' d='Shop.Theme.Actions'}{/if}
|
||||
{assign var=currentOrder value=$smarty.get.order|default:''}
|
||||
{if $currentOrder == 'product.date_add.desc'}
|
||||
Nowości
|
||||
{else}
|
||||
{if isset($listing.sort_selected)}{$listing.sort_selected}{else}{l s='Select' d='Shop.Theme.Actions'}{/if}
|
||||
{/if}
|
||||
|
||||
<span class="chevron_sort_container"><img src="{$urls.base_url}/img/cms/layout/chevron_green.svg" alt="Chevron"></span>
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
@@ -49,12 +55,14 @@
|
||||
{/if}
|
||||
|
||||
{/foreach}
|
||||
{assign var=sep value='?'}
|
||||
{if strpos($urls.current_url, '?') !== false}{assign var=sep value='&'}{/if}
|
||||
<a
|
||||
rel="nofollow"
|
||||
href="{$listing.sort_orders[1].url}"
|
||||
class="select-list {['current' => $sort_order.current, 'js-search-link' => true]|classnames}"
|
||||
>
|
||||
Nowości
|
||||
</a>
|
||||
rel="nofollow"
|
||||
href="{$urls.current_url}{$sep}order=product.date_add.desc"
|
||||
class="select-list js-search-link"
|
||||
>
|
||||
Nowości
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user