Skip to content

Instantly share code, notes, and snippets.

@eloyesp
Created May 31, 2023 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eloyesp/29061c09964cb34647baa653267cdaed to your computer and use it in GitHub Desktop.
Save eloyesp/29061c09964cb34647baa653267cdaed to your computer and use it in GitHub Desktop.
Shopify skip filters when all match
{%- liquid
# skip filters where all match
assign skip_filter = true
for value in filter.values
unless value.count == collection.products_count
assign skip_filter = false
break
endunless
endfor
if skip_filter
continue
endif
-%}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment