Created
May 31, 2023 14:21
-
-
Save eloyesp/29061c09964cb34647baa653267cdaed to your computer and use it in GitHub Desktop.
Shopify skip filters when all match
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{%- 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