Simple question, but can't get it myself...

if someone can help me out with this, its quite simple but I can’t seem to get it to work…

Basically, this is the code I have for now, the issue is if I have 0 product or items, I don’t want the sorting option to show up on the page, from the code below, what line can I add tosay that if there is no products in a category, not to show the SORT feature.

thanks in advance if anyone can help.

{if isset($orderby) AND isset($orderway)}

{if isset($smarty.get.id_category) && $smarty.get.id_category}
{assign var=‘request’ value=$link->getPaginationLink(‘category’, $category, false, true)}
{elseif isset($smarty.get.id_manufacturer) && $smarty.get.id_manufacturer}
{assign var=‘request’ value=$link->getPaginationLink(‘manufacturer’, $manufacturer, false, true)}
{elseif isset($smarty.get.id_supplier) && $smarty.get.id_supplier}
{assign var=‘request’ value=$link->getPaginationLink(‘supplier’, $supplier, false, true)}
{else}
{assign var=‘request’ value=$link->getPaginationLink(false, false, false, true)}
{/if}

{l s='--'} {if !$PS_CATALOG_MODE} {l s='Price: lowest first'} {l s='Price: highest first'} {/if} {l s='Product Name: A to Z'} {l s='Product Name: Z to A'} {if !$PS_CATALOG_MODE} {l s='In-stock first'} {/if} {l s='Sort by'} {/if}
Sponsor our Newsletter | Privacy Policy | Terms of Service