Jump to content

sort of category pages


Recommended Posts

Hello, I need help about sort products. When I click category link, I want to sort products date and in stock. In stock or date single I can sort but I need to sort of them 2 criteria first date after in stock.

 

If someone help about this, I'll be so happy. I search to sql line on .tpl pages but I couldn't find where is the that sql sentence.

Link to comment
Share on other sites

But it's for when do you choose from selectbox for sorting, I want to when I click category link, products should appear first which is new and in-stock. because forexample I added products 1 month ago after it comes my stock again so it must be shown top of the un-stock products. From panel I can choose just one criteria, for date or in stock, I wonder how can I make sort both criteria.

 

Thanks.

Link to comment
Share on other sites

Hi lupo,

If you would like to add additional options to your product-sort dropdown menu, add the following code to your theme's product-sort.tpl file:

 

<option value="date:asc" {if="" $orderby="" eq="" 'date'="" and="" $orderway="" 'asc'}selected="selected" {="" if}="">{l s='date: oldest first'}</option>
<option value="date:desc" {if="" $orderby="" eq="" 'date'="" and="" $orderway="" 'desc'}selected="selected" {="" if}="">{l s='date: newest first'}</option>

 

The specific line location may vary a bit by theme, but just look for a similar set of values right after

<form id="productsSortForm" action="{$request|escape:'htmlall':'UTF-8'}">

 

Just make sure not to put it in an area classified as for Catalog Mode only!

 

I hope this helps.

 

-Mike

Link to comment
Share on other sites

×
×
  • Create New...