Jump to content

Welcome, Guest!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

FooLab

sort search results (or products list on category/products lists) by more/less recent products

Recommended Posts

Hello,

is it possible to sort search results (or products list on category/products lists) by more/less recent products?

I think this is a "must-have" sorting option, don't you?

Share this post


Link to post
Share on other sites

Haha very funny, that yesterday I tried this 😂

Search in your theme for product-sort.tpl and add:

<option value="date_add:desc"{if $orderby eq 'date_add' AND $orderway eq 'desc'} selected="selected"{/if}>{l s='Newest first'}</option>

Please respond, if this works out well for you.

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
On 9/11/2019 at 7:49 PM, wakabayashi said:

Haha very funny, that yesterday I tried this 😂

Search in your theme for product-sort.tpl and add:


<option value="date_add:desc"{if $orderby eq 'date_add' AND $orderway eq 'desc'} selected="selected"{/if}>{l s='Newest first'}</option>

Please respond, if this works out well for you.

Thank you so much for sharing.. 🙂

Share this post


Link to post
Share on other sites

yes.. we use similar line in our old tb and ps websites..per client request.. shame, that code should have been included in the core of ps 1.6 and tb 1.0.x .. 🙂

anyway, tb 1.1.x now uses layernavi, which I believe is an excellent move by tb for 1.1.x.. overall, the code is still useful for websites that uses ps 1.6 and tb 1.0.x

Share this post


Link to post
Share on other sites

Hey guys, how we can add sort by "popularity"?

Share this post


Link to post
Share on other sites
On 5/14/2020 at 12:12 AM, wakabayashi said:

Whatever you mean by "popularity" (?), it wont be easy, I guess.

Like sort by total number of sales or sort by review ratings. Can't be done?

Share this post


Link to post
Share on other sites
11 minutes ago, KolS said:

Like sort by total number of sales or sort by review ratings. Can't be done?

Everything can be done. This particular thing is quite hard, though. The code that handles product list sorting is very old, hardcoded, and distributed all over the codebase. Which makes it a nightmare to override.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...