Created
June 4, 2010 22:22
-
-
Save carolineschnapp/426020 to your computer and use it in GitHub Desktop.
related-by-tags.liquid (snippet for Solo theme)
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 product.tags.size > 0 %} | |
<!-- START RELATED --> | |
<div id="related"> | |
<h6>{% if settings.related.size > 0 %}{{ settings.related | escape }}{% else %}Take a look at these great accessories:{% endif %}</h6> | |
<!-- START SLIDER --> | |
<div id="slider" class="clear"> | |
<!-- START PREV --> | |
<div id="prev"> | |
<p><a href="/collections/all" class="inactive">Previous</a></p> | |
</div> | |
<!-- END PREV --> | |
<!-- START WINDOW --> | |
<div id="window"> | |
<ul class="clear">{% paginate collections.all.products by 1000 %}{% for prod in collections.all.products %}{% if product.tags contains prod.title %} | |
<li> | |
<div class="image clear"> | |
<a href="{{ prod.url | within: collections.all }}"><img src="{{ prod.images[0] | product_img_url: "small" }}" alt="{{ product.title | escape }}" /></a> | |
</div> | |
<h4><a href="{{ prod.url | within: collections.all }}">{{ prod.title | escape }}</a></h4> | |
<p>{{ prod.price | money }}</p> | |
</li>{% endif %}{% endfor %}{% endpaginate %} | |
</ul> | |
</div> | |
<!-- END WINDOW --> | |
<!-- START NEXT --> | |
<div id="next"> | |
<p><a href="/collections/all">Next</a></p> | |
</div> | |
<!-- END NEXT --> | |
</div> | |
<!-- END SLIDER --> | |
</div> | |
<!-- END RELATED --> | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment