0

Is it possible to order search results by two fields? I have two price fields - price & sale_price and ideally need to order by both fields. Can this be done using the custom filters?

{exp:low_search:filters query='{segment_3}' result_page='products/results'}
    <select name="orderby_sort">
        <option value="">
            Order by
        </option>
        <option value="{low_search:url orderby_sort='price|asc'}"{if '{low_search_orderby_sort}' == 'price|asc'} selected{/if}>
            Price (Low to High)
        </option>
        <option value="{low_search:url orderby_sort='price|desc'}"{if '{low_search_orderby_sort}' == 'price|desc'} selected{/if}>
            Price (High to Low)
        </option>
    </select>
{/exp:low_search:filters}

1 Answer 1

1

Yes, by using separate orderby and sort parameters, eg:

{low_search:url orderby="foo|bar" sort="asc|desc"}
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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