I'm finding that search results are appearing in an inconsistent order in Magento 1.9.0.1.
In this example below I've specified that the results should order on price, which works, but products of the same price are appearing in a different order each time I perform the search.
Does anyone know how to fix this?
Two possible solutions (that I don't know how to implement) are:
- To add a default, base order-by to all advanced searches (on product ID or SKU for instance)
- Find a way of specifying multiple order-by fields, just like you would in a direct SQL statement, "...ORDER BY xxx ASC, yyy DESC..."
I believe I've fixed this by applying some extra XML to /app/design/frontend//thk/default/layout/catalogsearch.xml, see the "search_result_list" element below. This seems to have effectively achieved (1) above.
Kudos to Adam-Allen in this stackexchange answer.