Created
March 20, 2014 14:57
-
-
Save kyleaparker/9665660 to your computer and use it in GitHub Desktop.
Shopify: Show number of variants still available
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
{% assign total = product.variants | map: 'available' | join: ", " | remove: 'false, ' %} | |
{% assign available = total | split: ',' %} | |
{{ available.size }} of {{ product.variants.size }} left |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment