Created
October 17, 2018 19:45
-
-
Save atikju/d66367483d5368b70f8cb901a3f14c54 to your computer and use it in GitHub Desktop.
Shopify - Display Total Stock Quantity
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=0 %} | |
{%for variant in product.variants %} | |
{% capture i %}{{ total | plus:variant.inventory_quantity }}{%endcapture%} | |
{% assign total = i %} | |
{%endfor%} | |
Total Stock: {{ total }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment