All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

low search filters not working

Brian Rivet 1 Nov 2016 20:55 question, complete

Hi,

I'm having some trouble with my Low Search filters. I have a low search results tag I am using to load a set of entries. I set some default parameters for the limit, order, status, and sorting. I also have some filters set up to try to change those, but the filters don't seem to be having any effect. They are parsing and they are creating links with queries in them, but the output after clicking the link is the same each time.
Here's my code:


<div class="client-button">
<div class="dropdown">
<button class="btn btn-red dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
FILTER BY STATUS
<span class="caret"></span>
</button>
<ul class="dropdown-menu" aria-labelledby="dropdownMenu1">

{exp:low_search:filters query="{segment_3}" result_page="/login/ordering/%s"}

<li><a href="{low_search:url status=''}">All Statuses</a></li>
<li><a href="{low_search:url status='open'}">Open Orders</a></li>
<li><a href="{low_search:url status='closed'}">Closed Orders</a></li>

{/exp:low_search:filters}

</ul>
</div>

<div class="order-by btn-group">
<div type="button" class="btn btn-default">Order By</div>
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="caret"></span>
<span class="sr-only">Order By</span>
</button>
<ul class="dropdown-menu">

{exp:low_search:filters query="{segment_3}" result_page="/login/ordering/%s"}

<li><a href="{low_search:url orderby='entry_id' sort='desc'}">Order# - Descending</a></li>
<li><a href="{low_search:url orderby='entry_id' sort='asc'}">Order# - Ascending</a></li>
<li><a href="{low_search:url orderby='entry_date' sort='desc'}">Date - Newest to Oldest</a></li>
<li><a href="{low_search:url orderby='entry_date' sort='asc'}">Date - Oldest to Newest</a></li>
<li><a href="{low_search:url orderby='status|entry_date' sort='desc|desc'}">Status - Open</a></li>
<li><a href="{low_search:url orderby='status|entry_date' sort='asc|desc'}">Status - Closed</a></li>

{/exp:low_search:filters}

</ul>
</div>

<div class="per-page btn-group">
<button type="button" class="btn btn-default">Per Page</button>
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="caret"></span>
<span class="sr-only">Per Page</span>
</button>
<ul class="dropdown-menu">
{exp:low_search:filters query="{segment_3}" result_page="/login/ordering/%s"}
<li><a href="{low_search:url limit='5'}">5</a></li>
<li><a href="{low_search:url limit='10'}">10</a></li>
<li><a href="{low_search:url limit='15'}">15</a></li>
<li><a href="{low_search:url limit='20'}">20</a></li>
{/exp:low_search:filters}
</ul>
</div>

<a href="{path='login/place-order'}" class="btn btn-green">
<span class="glyphicon glyphicon-plus"></span>
PLACE AN ORDER
</a>
</div>

{exp:low_search:results channel="orders" dynamic="no" default:limit="10" paginate="bottom" default:status="open|closed" default:child:related_customer="{custCompany}"}

{if low_search_no_results}<p>You have no orders at this time.</p>{/if}

{if count == "1"}

<div class="ordering-list">
<ul>
{/if}

<li>{related_customer}{related_customer:title}{/related_customer} - Order#{entry_id} - {entry_date format="%n/%j/%y"} - <span class="order-{status}">{status}</span> <a href="{path='login/ordering/{entry_id}'}">(view order)</a></li>

{if count == total_results}
</ul>
</div>
{/if}

{paginate}
{pagination_links}
{pagination-code}
{/pagination_links}
{/paginate}

{/exp:low_search:results}



Can you tell me if I am doing anything wrong here or if there is some other issue?

Thanks,

Brian

Replies

  1. Low 2 Nov 2016 09:15

    Your Results tag doesn't have a query="" parameter, so it can't read the encoded query in the URI. If you're encoding queries, use query="{segment_3}" on your Results tag.

  2. Brian Rivet 2 Nov 2016 13:18

    Thanks! Can't believe I missed that :)