Filter Multiple Item Categories

Maybe I’m missing it somewhere, but is there a say to filter multiple item categories and display all that match?

For example, I have a dropdown with: Cars, Boats, Bikes, Jet skis, Scooters.
On the backend, each item have their categories set to Cars, Boats, Bikes, Jet skis or Scooters. In ADDITION to that, they are in categories such as Land or Water.

Right now, I have the dropdown working to pull Cars, Boats, Bikes, Jet skis OR Scooters. However, I would like to have an option for Land OR Water which would pull ALL Cars/Bikes/Scooter or ALL Boats/Jet Skis without having to create another separate category.

Make sense? I feel like I’m missing something really easy.

Current href that pulls just Cars from the category Title/Cars. Ultimately, I would like to pull Land AND Water which would include all of the above:

href="/people-advanced-search?prop_ModuleId=1862&prop_KeyWords=&prop_PreferredFirstName=&prop_LastName=&prop_ItemCategories=Title/Cars

Thanks in advance.

You should be able to add another dropdown, with the same name (ie: name="prop_ItemCategories") with the options for LAND and WATER.
Basically, this will add 2 parameters to the URL search query.
If the user only selects LAND, it’ll find all items with LAND assigned.
If the user selects LAND and BIKES it’ll find all items with BOTH LAND AND BIKES assigned.

Note that the search algorithm here is always an AND operator so if multiple categories are selected it will only return items that have ALL of those categories assigned. Which I think will work fine in your case since LAND and WATER items don’t crossover?
But if so, perhaps hiding the second dropdown might be an option if LAND or WATER has been selected?

Hope that helps.

PS: the URL search query would look like this with multiple categories searched:
prop_ModuleId=1862&prop_KeyWords=&prop_PreferredFirstName=&prop_LastName=&prop_ItemCategories=Land&prop_ItemCategories=Title/Cars

Thanks Adam.

I think I am looking for more of an OR statement. I would like query to return if the items has any one of the categories, but not all.

Any ideas on having a query that would return the item if it matches any of the terms, even if there is crossover?

I have not been able to filter multiple categories or custom properties at once. Using a search form or URL like …

…prop_ItemCategories=NAME1&prop_ItemCategories=NAME2…

Stacking them back to back like above doesn’t produce a result or only displays the last property.

Using searchscope as shown below produces the same results as above, nothing or anything in the Car category.

…searchScope: “{‘prop_ItemCategories’:[‘Land/Truck’,‘Land/Car’]}”,…
…searchScope: “{‘prop_ItemCategories’:‘Land/Truck’,‘prop_ItemCategories’:‘Land/Car’]}”,

Don’t know if I am missing something here.

Here are my workarounds

  1. Create a Land category as the parent to the Land items or even just a category. You will have to make sure it is checked on all the items. This will then allow you to use the “prop_ItemCategories=Land” etc.

  2. Create a custom property with Land and Water dropdown options. This will then let you search for all items in Land using “prop_CustomField=Land”. But also any category in land like Cars.

I did this on a user submitted form and added some javascript to auto select the property based on the category they selected so we didn’t have to worry about them selecting it and getting it wrong.

Backlog Request: Category Filtering

If truly broken and not my stupidity, fix searchscope so that this works when wanting to search for more than one item property…

…searchScope: “{‘prop_ItemCategories’:[‘Land/Truck’,‘Land/Car’]}”,…

Fix Custom Module select multiple item Search. So this works.

…prop_ItemCategories=NAME1&prop_ItemCategories=NAME2…

These may both be one and the same as far as how they will work in the end.

When setting up a category with a parent for example…

Land
–Car
–Truck
Water
–Boat
–Jet Ski

When a Child is selected (Car) the parent should automatically be selected (Land). Currently, it is not. This way when searching for Land everything under Land would come up.