Forums Forums Search & Filter Pro Incorrect Search Results

Viewing 5 posts - 1 through 5 (of 5 total)
  • Anonymous
    #5996

    Building a client site at http://dev.door2doortyres.co.uk/ and I have run into a serious problem.

    This is for the Pro version of the plugin.

    The problem may be me or it could be a fundamental error in the code but I can’t work out what I need to do…

    The WooCommerce products hold 1136 tyres at the moment. If you search for a tyre width of 145 (it shows there are 2) you get 2. When you search for widths of 145 AND a profile of 45 (3) you get zero – which is correct because there are no tyre combinations of 145/45. So everything seems to work as expected until you search as follows:-

    #1. Width 205, Profile 70, Rim 15 – you get 9 results – which is correct.

    #2. Width 205, Profile 50, Rim 16 – you get 83 results – which is correct …. but included in that set of results are a couple of tyres that are 205/70/15 tyres.

    The search form is setup to use Products, no Ajax, no Template and all taxonomy’s are set up in the same way (dropdown, display count, hide empty, hierarchical, order by slug asc)

    Q1 is what could cause a couple of products to leak in to the search results?

    Q2 what can I do to overcome this?

    Q3 Is there a way to make the search form taxonomy dropdowns only populate with data that is relevant to the previous taxonomy – meaning if I search for widths of 145 that the Profiles seen next are only the two possible profiles (70 and 65)?

    Fingers crossed.

    Anonymous
    #6041

    I now know what was the problem but I don’t understand it.

    The problem was something to do with pagination of the results. In a search for 205/55/16 it correctly returns 83 results but if the results are set to 24 per page and you click into page 2 or any other page the result total changes dramatically – like from 83 to 236 and populates the page with a load of inaccurate results.

    My fix was simply to set the results page to a value that is unlikely to ever happen – I used 500.

    Now the results seem to be stable….but I’ll let you know (or the client will as he’s checking it now.

    Ross Moderator
    #6258

    Hey Paul

    I have a couple of suggestions.

    Please ensure that use custom template is ticked in the admin. Then also make sure you fill in a filename for displaying results (this could be any template from your theme – such as search.php or archive.php).

    After this, set a slug for the page (such as tyre-search).

    I’m hoping these steps will help fix your problems.

    Let me know.
    Thanks

    Anonymous
    #6265

    Ross,

    No need now – the client much prefers how it is all working so based on the principle “if it ain’t broke” I’m leaving it like it is. 🙂

    But maybe you can answer Q3 for me…if it’s possible.

    Ross Moderator
    #6355

    Hey Paul, no worries better to leave things be sometimes haha…

    RE Q3, this is a feature I’m working on (you can see it in the beta features called “auto count”) however this is not working for many users, I will look to get this fixed in the next major plugin update.

    Thanks

Viewing 5 posts - 1 through 5 (of 5 total)