How to insert a product filter on the main product page

max_max_max
Shopify Partner
35 0 3

Hello.

 

I am using theme Focal.

 

Please tell me how to insert a product filter on the main product page (collection/all)?

Also, I can't access this page through customization.

 

Thanks!

EDIT:

I half understood what the problem was. filter for collection/all is empty. Because of this line


{%- if section.settings.show_filters and collection.filters != empty -%}

and if I remove the condition collection.filters != empty, then the filter appears, but the filter is EMPTY. Why is there an empty filter for collection/all, and how can I fix this?

Replies 5 (5)

BananaMoon
Excursionist
64 1 5
max_max_max
Shopify Partner
35 0 3

Thanks, but that doesn't help. I know this is done in section main-collection.liquid, and I even know what code the filter has, and this filter is listed in this section, but I don't understand why this filter is not rendered on collections/all. On the rest of the pages of the collection, the filter is rendered.

BananaMoon
Excursionist
64 1 5

Hello,

This goes a little more than that - if the person could fix it alone he would never ask here.

Anyways no one wants to do free learning.

Take care with Shopify,

BananaMoon
Excursionist
64 1 5

You said in product page, now in collection page,

These are 2 quite different sets of data in terms of Shopify objects (and so database).

Some are accessible everywhere, some other not (shopify.dev).

 

AzureMinion
Shopify Partner
28 0 0

collections/all is the default page that lists all items. I guess the default filter would not work correctly on this page or you need to create /all collection. There is an easy way to insert filters to any page, add a filter app like https://apps.shopify.com/ultimate-search-and-filter-1. It helps you add many filter types to any page including collection, search page, etc.