Created
March 5, 2024 00:56
-
-
Save dpw1/a3918785ed5e834608abe3c929146ad4 to your computer and use it in GitHub Desktop.
Hide sold out products at featured collection section
This file contains hidden or 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
{% comment %}Hide sold out variants by ezfycode.com [START]{% endcomment %} | |
{% assign all_products = null | sort %} | |
{% assign count = 0 %} | |
{% for each in section.settings.collection.products %} | |
{% if each.available %} | |
{% assign _product = each | sort %} | |
{% assign all_products = all_products | concat:_product %} | |
{% endif %} | |
{% if count == section.settings.products_to_show %} | |
{% break %} | |
{% endif %} | |
{% endfor %} | |
{% comment %}Hide sold out variants by ezfycode.com [END]{% endcomment %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment