How to add Facets/Filters to Featured Collection component in Dawn 2.5.0

Hi, I’m trying to build a site using Dawn 2.5.0 and my client wants to have the homepage experience closely mirror the /collections/all page (a collection of all available products with the ability to filter).

I’m able to use a “Featured Product” component to get the products on there but I can’t seem to get Facets to work. (I’ve copied the following code in the top of the featured-collection.liquid file, but something’s not quite working)

{%- if section.settings.enable_filtering or section.settings.enable_sorting -%}
  {{ 'component-facets.css' | asset_url | stylesheet_tag }}
  

  

    {% render 'facets', results: section.settings.collection, enable_filtering: section.settings.enable_filtering, enable_sorting: section.settings.enable_sorting, collapse_on_larger_devices: section.settings.collapse_on_larger_devices %}
  

{%- endif -%}
2 Likes

Hi @jfree64 ,

This is not possible, Facets/Filters object only works when you access collection page or search page. So if you want to add it for ‘Featured Collection Component’ at home page, you can just install app for it.

Refer https://apps.shopify.com/product-filter-search or https://apps.shopify.com/product-filter-and-search

Hope it helps!

You will need a filter app if you want to add filters to a page rather than collection and search pages. You can try this one https://apps.shopify.com/ultimate-search-and-filter-1