[Liquid] [OS 2.0] - collection.filters is different between Theme Editor and Storefront

Leo_Huynh
Tourist
7 1 5

Like the title, with this liquid code on collection page:

 

{%- for filter in collection.filters -%}
  <div>{{ filter.label }}</div>
{%- endfor -%}

 

 

On Theme Editor:

 

<div>Availability</div>
<div>Price</div>
<div>Product type</div>
<div>Brand</div>

 

 

But on the storefront, nothing output (I check the page source)

This seems really weird, can anybody guess the reason? 

Leo Huynh | Shopify Software Engineer @ Insights Studio
Email: leo@insights.is
Personal site: https://leohuynh.dev
Reply 1 (1)

LitCommerce
Astronaut
2860 684 736

Hi @Leo_Huynh,

Did you set it up in Navigation? https://i.imgur.com/h2qkQ9T.png .

Please check: https://help.shopify.com/en/manual/online-store/themes/os20/customize/filters

And it will display by product of the collection, so you need to make sure the product data is always correct.

Hope it helps!

If my answer can help you solve your issue, please mark it as a solution. Thank you and good luck.

LitCommerce - The Most Simple & Affordable Multi-channel Selling Tool.
Effortlessly sell on biggest marketplaces like Amazon, Etsy, eBay, Facebook etc with bulk listing tool, real-time sync & smart order management. Use LitCommerce free for 1-year now!