Miva Merchant 5 Module FAQs » Focus


{docurl}

Having the search limited to certain fields by default

Is there a way to specify exactly where it searches? I'd like it to search the product name, and a custom field with keywords by default, and then additionally add the ability to check boxes for other custom fields like ingredients and use.


So you want it to always search in the name and "keywords" field and also give the customer the option to search in other fields? You can do this by adding the option to limit the search to the "name" and custom field in a hidden form field. For example, say your custom field that you want to include by default for all searches has the code "keywords", you would add the form field:

<input type="hidden" name="SearchFields" value="name,keywords">

inside of the form on the Focus page (i.e. inside of the

<form name="focus" method="post" action="%session_url%">

and

</form>

tags. With this hidden form field, the search will always include the name and keywords field (and no others by default) but will let the customers select other fields by the tokens you have used in the template.



Last update: 2009-02-09 16:14
Author: Michael Brock
Revision: 1.1

Print this record Send FAQ to a friend Show this as PDF file
Please rate this FAQ:

Average rating: 0 out of 5 (0 Votes )

completely useless 1 2 3 4 5 most valuable

You cannot comment on this entry