Created
March 2, 2018 16:16
-
-
Save tiagomatos/2e57d5047e61b0bd950e060b600ebb2d to your computer and use it in GitHub Desktop.
Products from the same Product's Sub-Category
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 vina_cat in store.category['vinas'].subcategories %} | |
{% for product_cat in product.categories %} | |
{% if vina_cat.id == product_cat.id %} // identify the vina category (monos) | |
{% assign cat = vina_cat %} | |
{% endif %} | |
{% end %} | |
<h2>{% t 'Wines from the same vineyard' %}</h2> | |
{% for prod in cat.products limit:8 %} | |
{% continue if prod.id == product.id %} | |
{{ product.name }} | |
{% endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment