Support » Plugin: FireStorm Professional Real Estate Plugin » [Plugin: FireStorm Professional Real Estate Plugin] Search by fields is semi-broken

  • Resolved Chosker


    Hello there,

    I’m doing a search with custom fields. The problem is that when you use more than one, the search results include listings that meet either one or the other field, instead of needing to meet both of them.

    for example, if I have 2 custom fields: ‘Property Type’ and ‘Availability’
    and I have the following 3 properties:
    Property 1 – Property Type: House – Availability: Rent
    Property 2 – Property Type: Flat – Availability: Rent
    Property 3 – Property Type: Flat – Availability: Sale

    now if I do a search where ‘Property Type’ = Flat and ‘Availability’ = Rent, all 3 properties will come up as search results, but only Property 2 should be coming up because it’s the only one that meets both search criteria

    The problem lies in how the SQL query is being made. I’ll be fixing this on my end (on a tight schedule with a client here, can’t wait for plugin updates), but I thought I’d let you know

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author FireStorm Plugins


    Hi Chosker, thank you for notifying us of this issue. It does require a fix to the SQL. Can you submit a support ticket and outline what you fix so we can make sure the next update has the same type of fix so we can verify there will not be any issues when you update the plugin?

    You can submit a ticket here:

    I have the same problem. Can you please share the fix in here? I could not update the whole plugin because I made lots of in code translations and modifications in it. 2.06.03 user here…

    Plugin Author FireStorm Plugins


    Hello, this issue should be resolved in the version you are using. Can you also submit a support ticket using the link above providing us with the link to your website?

    Well I am not a php or mysql expert but i think i found a solution for my problem.

    In search_page.php I have added these two lines for getting how many custom field values in search:(added Line 59,60 in if statement)

    $tagArray = explode(",",$FieldSearchSQL);
    $arrayCount = count($tagArray);

    Also I have added one more if statement for checking if there is no field checked in search widget:(for eliminating “COUNT(*) = 0”)

    if ( $arrayCount != 0) {
    $arrayCountAdd = 'HAVING COUNT(*) = ' .$arrayCount;
    } else { $arrayCountAdd = ""; }

    After that I used that number with HAVING COUNT in SQL query:(changed line 72, added HAVING COUNT in SQL query)

    $SearchSQL .= ' GROUP BY '.$wpdb->prefix.'fsrep_listings.listing_id '.$arrayCountAdd.' ORDER BY '.$wpdb->prefix.'fsrep_listings.listing_id DESC';;

    These additions solved my multiple search criteria problem like for Sale / Rent , property type, room number etc. Now search widget looking for if criteria is selected and if the listings have all the matching selected criteria.

    Kind Regards.



    Here is a quick fix:

    $FSREPSearch is set to ā€œSā€. $FSREPSearch is fine until line 147 of define.php at which point it gets set to the value of $FSREPSearch[‘query’]. Commenting out line 147 of define.php fixes search for me.

    so to be short:

    -Open define.php of the firestorm plugin.
    -go to line 147
    -remove this line : if (isset($FSREPSearch[‘query’])) { $FSREPSearch = $FSREPSearch[‘query’]; }
    -save the file
    – Search works!

    Kind regards,

    APR Webdesign

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: FireStorm Professional Real Estate Plugin] Search by fields is semi-broken’ is closed to new replies.