0

I've purchased Solspace's Super Search but can't seem to get the range working correctly. I've followed the docs and it seems to be set-up correctly but isn't correctly returning the ranges.

I'm using a simple GET filter form for a size range. The sizes are inputted into EE and are being collated correctly in the form but the results aren't working.

This is my form:

<form action="{path='letting/search'}" id="letting_form" method="GET">
        <label>Search by size:</label> 
        <select class="small" style="margin-right:6px;" name="unitsize-from"> 
            <option value="0">From</option>
            <option value="0">0</option>
            <option value="50">50</option>
            <option value="100">100</option>
            <option value="150">150</option>
            <option value="250">250</option>
            <option value="350">350</option>
            <option value="500">500</option>
        </select>

        <select class="small" name="unitsize-to">
            <option value="9999">To</option>
            <option value="50">50</option>
            <option value="100">100</option>
            <option value="150">150</option>
            <option value="250">250</option>
            <option value="350">350</option>
            <option value="500">500</option>
            <option value="750">750</option>
            <option value="1000">1000</option>
        </select>

        <select name="unit_type">
            <option value="">Select Retail or Office Availability</option>
            <option value="retail_space">Retail Space</option>
            <option value="office_space">Office Space</option>
        </select>

        <button type="submit">Search</button>

It outputs:

/search?unitsize-from=250&unitsize-to=750&unit_type=retail_space

This is my output:

{exp:super_search:results channel="unit_space"}
    {if unit_availability == "Available"}
    <tr>
        <td>{unit_type}</td>
        <td>{categories}{category_name}{/categories}</td>
        <td>{title}</td>
        <td>{unitsize}</td>
        <td><a href="{unit_brochure}">Download</a></td>
        <td><a class="view-more" href="#{url_title}">View</a></td>
    </tr>
    {if:else}
    <p>There are no units available at this time.</p>
    {/if}
{/exp:super_search:results}
0

Super Search works best as a POST form. Try changing your form to have method="POST".

Also, if you haven't done so yet, you might also want to go in the Super Search CP, under the Fields tab, and change the field type to an integer to allow better -from/-to range searches based on numbers. Make a backup of your database before you do any changes there.

| improve this answer | |
  • Thanks! The field type fix worked. Anyone else having this issue, just make sure the field type is set to integer. – kala233 Jun 24 '14 at 11:05

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.