This page showcases a filtering functionality that I created for an ecommerce store doing $60k in monthly sales. There are products in this store that make use of multiple tiers of categories. An example of this hierarchy is:
- Category of product (e.g. “Flowers”)
- Strain effect of product (e.g. “Euphoric”)
You can see from the screenshots below, that the products were able to be filtered by both of these categories. The filtering functionality was performed by fetching MySQL data, and running it through a custom PHP filtering functionality that I wrote for the site.
By default, the platform used (WooCommerce) allowed filtering only by top-level product category. Adding extra levels of product categories required this custom filtering functionality.