Skip to content

Instantly share code, notes, and snippets.

@davelowensohn
Created May 25, 2016 08:15
Show Gist options
  • Save davelowensohn/5ff10657a1626753ed49fc45dc6c3d7b to your computer and use it in GitHub Desktop.
Save davelowensohn/5ff10657a1626753ed49fc45dc6c3d7b to your computer and use it in GitHub Desktop.
Shopify semi-automatic vendor collections
{% assign product_vendor_handle = product.vendor | handle %}
{% if collections[product_vendor_handle].handle == product_vendor_handle %}
{% assign vendor_url = collections[product_vendor_handle].url %}
{% else %}
{% assign vendor_url = product.vendor | url_for_vendor %}
{% endif %}
<div id="product-vendor"><span class="product-vendor">{{ product.vendor | link_to: vendor_url }}</span></div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment