Miva Merchant 5 Module FAQs » Focus


Restricting the search to more than one category

Is it possible to restrict the search to more than one category at a time? Say I want to "fake" a category of "costumes" which will restrict the search to "kids costumes", "adut costumes" etc. Is this possible?

You can indeed to this When Focus actually processes the search, it module expects the search categories to be in a list separated by commas. For example,


would restrict the search to category1 OR category2 OR category3. Fortunately, when Miva Script has multiple form fields with the same names it concatenates the values together with commas.

So you could have the categories listed as checkboxes:

<input type="checkbox" name="SearchCategories" value="category1"> Category1
<input type="checkbox" name="SearchCategories" value="category2"> Category2
<input type="checkbox" name="SearchCategories" value="category3"> Category3

if the customer selects multiple categories, they will automatically be concatenated together:


You can emulate this with a select list to offer more than one category at a time

<select name="SearchCategories">
<option value="category1,category2,category3">Houses</option>
<option value="category2,category3,category5">Big Hosues</option>

Last update: 2008-10-09 14:17
Author: Thor
Revision: 1.0

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