Announcement

Collapse
No announcement yet.

Always display product properties in search results

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Always display product properties in search results

    Hi,

    Does anyone know of a way to have the search results display all properties for a product regardless of whether they were a part of the search or not?

    We have a number of true/false properties, i.e waterproof, heavy duty etc... along with brands that i have set to be searchable and added to the searchable properties fields. I have also set searchResultsProp to show so that when you do a search and select a property as part of that search it will write out the resulting match below the product, i.e include waterproof and under the results it says 'waterproof: 1'

    What i am hoping to do is to write out all properties for that product regardless of whether they were searched on and there result. Therefore the same search would still produce the 'waterproof: 1' but would also include 'heavy duty: 0 brand: Pepsi'.

    The plan is to then take these properties and via javascript turn them into a selectable filter menu for the results, thus showing them all regardless of the result gives me something to work with.

    I am going through SearchScript.pl at present but any assistance would be greatly appreciated.

    Regards,

    Guy

    Lock Shop Warehouse - Lead Developer
    Dedicated to offering a huge range of discounted locks, padlocks & safes
    Regards,

    Guy

    Lead Developer - Lock Shop Warehouse
    Offering discounted padlocks, and a huge range from the best door lock suppliers, all alongside other essential security products.

    #2
    Turns out this is alot simplier than i was tring to make it.....

    All you need to do is set the HTML Representation for each option to 'listbox with multiple selection'

    By doing so you can now select all the options, apart from 'Any', via javascript upon submission of the form. This will then output the properties and their results for all products.

    Essentially this output is stylable via SearchScript.pl (line 829). My plan is to build a sidebar with all the properties as filter options and then have javascript show or hide the search results based on what the user filters.

    This way the user performs a text based search on any page (I have attached the search properties to the search on all my pages). The text is what essentially generates the inital results but these can then be filtered by any of the properties via the side bar without the need to search again. The filtered results are therefore quicker and i can provide info on how many products match each property in the side bar.

    Once I've got something together I don't mind posting a more complete solution if anyone else thinks this would be of use. Just let me know.
    Regards,

    Guy

    Lead Developer - Lock Shop Warehouse
    Offering discounted padlocks, and a huge range from the best door lock suppliers, all alongside other essential security products.

    Comment


      #3
      Hi Guy,

      Just looked at your website & quite impressed with the filtering of search results. Could you please post some details on how its done.

      Many Thanks & Kind Regards,
      Nilesh

      Comment

      Working...
      X