Announcement

Collapse
No announcement yet.

Searching multiple properties

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

    Searching multiple properties

    Is it possible to search multiple properties from a single search box? I've a custom variable on my products that contains a comma separated list of additional keywords that I'd like searched in addition to the product description. Now I could put them in the extended info in a display:none div, but that's not very pleasant. Is it hackable in the perl search scripts?

    #2
    If you are wanting to do a Boolean search the inbuilt advanced search page offers this facility already.

    As you have populated several keywords into the 1 field this may need some extra scripting in PHP to explode the string into its constituent parts and then possibly generate an array() with the results


    Bikster
    SellerDeck Designs and Responsive Themes

    Comment


      #3
      A specific example may help. I'm doing a disability aids shop. The client wants people to be able to search for specific disabilities and to have the search bring back products helpful to people with the condition. What they don't want is for each product page to contain a bunch of keywords at the bottom and the products are being populated from Sage so the descriptions can't easily be tweaked with hidden content. I don't want to have a bunch of additional search options on the search page (pick a disability! pick a keyword!). Simple like Google's search. OK, they'll have to spell Multiple sclerosis correctly to get any results, but I can always autosuggest that with javascript if it's an issue.

      I'm up for exploding some strings. At what point does Actinic do the indexing? Is it on the fields themselves or on some kind of post PHP processed version of the fields?

      Comment


        #4
        If this is likely to be a popular requirement, could you create a 'shop by disability' section in the store instead?

        Comment


          #5
          I've found a cunning workaround. The problem is that Actinic indexes custom properties differently. It actually searches the index in a different way, assuming you want a match from string start only, which isn't what I want. So, the solution is to append the keywords to the extended info text after a marker (e.g. $$$$), tell Actinic to index the field, and then use a spot of PHP on the extended info pages to prevent output of the keywords.

          Now I've got to break the news to our Sage boys that they've got to change their Actinic integration module.

          Comment

          Working...
          X