Created
March 6, 2019 18:43
-
-
Save joe-dempsey/59b3282d4c9147a23cc206e6d7d9a0a5 to your computer and use it in GitHub Desktop.
split products on collections
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
{% for product in collection.products %} | |
{% assign split_product = false %} | |
{% unless product.tags contains "hidden_on_store" %} | |
{% for tag in product.tags %} | |
{% if tag contains 'split_to_variants' %} {% assign split_product = true %} {% break %} {% endif %} | |
{% endfor %} | |
{% if split_product == true %} | |
{% for variant in product.variants %} | |
{% include 'product_variant_item', show_vendor: section.settings.show_vendor, show_quick_shop: section.settings.show_quick_shop %} | |
{% endfor %} | |
testing variants | |
{% else %} | |
{% include 'product_grid_item', show_vendor: section.settings.show_vendor, show_quick_shop: section.settings.show_quick_shop %} | |
{% endif %} | |
{% endunless %} | |
{% endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment