Filtering Multiple Specifications

Regular readers will remember that I posted up a system of adding specifications to products, which are then filterable in the category structure (eg, show me products that have a specification of “blue” in this category). Read more.

In that post, one task for the future was;

A way to filter based on multiple specifications; show me products within category X that have both Specification 1 and Specification 3, but not Specification 2.

Pleased to say that this is now done, and looks like this:

So, the products within the category can have any, or all, or none of those 3 specifications “red”, “green”, “blue” – obviously you can have an unlimited number of different specifications and each product can have multiple specs attached to them. When the user ticks (for example) the “blue” tickbox, the product listing shows only those products that have the “blue” specification. The user can then also tick the “red” box and the listing shows those products that have “blue” spec and those that have “red” spec.

A nice little system for adding a layer of specifications and allowing the potential buyer to easier find what they are looking for at your site.

3 Replies to “Filtering Multiple Specifications”

  1. Gary,

    Could you have different specifications for each category that only show when within the relevant category?

    Also, could you have multiple attributes to filter on, such as cable cores, cable colour, cable grade?

  2. Paul

    Filters are attached to products, so if you added “red” and “blue” to product X in category 3 and then “green” to product Z in category 5…what will happen is;

    In category 3, the filter box will show “red” and “blue” and the user can filter on that. It won’t show “green” or “white” as no products in the category 3 have those filters. Hope that makes sense?

    For multiple filters, I coded it up as a “OR” system; show me products that are “red” OR “blue”. So, if 1 product has “red” and “blue” (product aaa) and another has just “blue” (product bbb) and say another has just “yellow” (product ccc) [all in the same category], then the filter will give options of “red”, “blue”, “yellow”. Say the user wants to find products that have BOTH “red” and “blue”, then that’s not presently possible. My codebase (if selecting “red” and “blue”) would show the two products; aaa and bbb.

    There is no reason why the system could not be changed to an AND system, ie; show me products that have filter “red” AND “blue”; therefore showing the customer product aaa only.

    Kinda makes sense ?

Leave a Reply

Your email address will not be published. Required fields are marked *