Doofinder logo

Support Documentation

Search icon

Custom Sorting To Adjust The Order of Products

Apply Custom Sorting To Display the Lowest Priced Product, Or Availability, Within A Product Group In Your Layer

This is a sensitive setting. In this sensitive context, Custom Sorting directly impacts the display order of results. If you're experiencing unexpected outcomes and have been adjusting Custom Sorting, consider resetting this parameter.

Case 1

This function helps the user ensure that Doofinder displays the product with the lowest price from a group of products, instead of the parent product, regardless of the "group_leader" field: ''true'' (whether it's indexed or not). We only need each group of products to be grouped with the same "group_id".

in stock flag

By default, Doofinder will always display the “group_leader” to “true” for a set of grouped products, so it's a viable way to show the product with the lowest price.

There are other cases where the "sale_price" is not indexed in parent products, in which case this change helps save time and prevents the customer from having to update the product database. We can use "best_price" or "sale_price" in Custom Sorting as the second field (following score) in descending order.

To configure this, go to Search Engines > Settings > Custom Sorting.

This is how it should look like once configured:

in stock flag
in stock flag

Case 2

Another example: In this other scenario, Custom Sorting has been set to “availability ascending”, prioritizing 'on stock' products at the forefront of the search results, followed by 'out of stock' products.

in stock flag
  • Porduct order before the Custom Sorting configuration:
in stock flag
  • Product order after the Custom Sorting configuration:
in stock flag

Did you find this page helpful?