Created
September 17, 2014 15:50
-
-
Save zakhardage/9c48788ad76588d7d2d8 to your computer and use it in GitHub Desktop.
Wishlist Item Count
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
| {% if customer %} | |
| {% for tag in customer.tags %} | |
| {% assign t = tag | remove:'x' %} | |
| {% unless tags contains t %} | |
| {% capture tags %}{{ tags }} {{ t }}{% endcapture %} | |
| {% endunless %} | |
| {% endfor %} | |
| {% for collection in collections %} | |
| {% paginate collection.products by collection.all_products_count %} | |
| {% for product in collection.products %} | |
| {% if tags contains product.id %} | |
| {% assign wishlist-count = wishlist-count | plus:1 %} | |
| {% endif %} | |
| {% endfor %} | |
| {% endpaginate %} | |
| {% endfor %} | |
| {% if wishlist-count > 0 %} | |
| Wishlist: {{ wishlist-count }} | |
| {% endif %} | |
| {% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment