1

We can set a <default_sort_by> which might be something like "Best Seller" but with Search results, I would rather the Default_sort be Relevance.

First of all, is it possible to setting options like this though Magento's current configuration?

If Not, where would we look at implementing logic that would check to see if relevance (in this case) is available.. IF so, make relevance the default sort. ELSE use bestseller.

1 Answer 1

2

In order to set default sort by 'relevance' in search, one of the way to set hidden field like this in your search form.

<input type="hidden" name="order" value="relevance">
<input type="hidden" name="dir" value="desc">

By doing this your search will be ordered by relevence,descending while you can keep default product listing to whatever you want.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.