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 option in product.options %} | |
{% if option contains "Color" %} | |
{% assign optionName = "option" | append: forloop.index %} | |
{% assign colors = product.variants | map: optionName %} | |
{% assign colorsFiltered = '' %} | |
{% for colorOption in colors %} | |
{% unless colorsFiltered contains colorOption %} | |
{% assign colorsFiltered = colorsFiltered | append: ', ' | append: colorOption %} | |
{% endunless %} | |
{% endfor %} |
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 = product.variants | map: 'available' | join: ", " | remove: 'false, ' %} | |
{% assign available = total | split: ',' %} | |
{{ available.size }} of {{ product.variants.size }} left |
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
{% if product.options.size == 1 %} | |
{% for variant in product.variants %} | |
{% unless variant.available %} | |
jQuery('.single-option-selector option:contains(' + {{ variant.title | json }} +')').remove(); | |
{% endunless %} | |
{% endfor %} | |
jQuery('.single-option-selector').trigger('change'); | |
{% endif %} |
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
<ul> | |
{% comment %}A linklist should be created called "Collections" containing each of the "top" level collections{% endcomment %} | |
{% for link in linklists.collections.links %} | |
{% assign col = link.object %} | |
<li class="{% if col.handle == collection.handle %}active{% endif %}"> | |
<a href="{{ link.url }}"><span>{{ link.title }}</span></a> | |
{% if col.all_tags.size > 0 %} | |
<ul> | |
{% assign tag_index = 0 %} | |
{% assign current_tag = "" %} |
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 collection_tags = collection | map: 'tags' %} | |
{% for tag in collection_tags %} | |
<a href="/collections/{% if collection.handle != blank %}{{ collection.handle }}{% else %}all{% endif %}/{{ tag | handleize }}" title="{{ tag | escape }}">{{ tag }}</a> | |
{% endfor %} |
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
<!--In theme.liquid, change:--> | |
<meta content="0; url=/account/login?checkout_url={{ return_url }}" http-equiv="refresh" /> | |
<!--to --> | |
<meta content="0; url=/account/login?return_url={{ return_url }}" http-equiv="refresh" /> | |
<!-- In customers/login.liquid, give the submit button an ID of customerlogin, for example: --> |
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 count = paginate.pages %} | |
{% for part in (1..count) %} | |
<li {% if paginate.current_page == part %}class="active"{% endif %}><a href="{{ collection.url }}?page={{ forloop.index }}">{{ forloop.index }}</a></li> | |
{% endfor %} |
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
<script> | |
jQuery(document).ready(function($){ | |
var images = []; | |
{% for image in product.images %} | |
images.push({url: "{{ image | product_img_url: 'medium' }}", alt: "{{ image.alt }}"}); | |
{% endfor %} | |
var thumbnails = $(".thumbs"); |
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
<ul> | |
{% assign current = "" %} | |
{% for product_vendor in shop.vendors %} | |
{% assign first_letter = product_vendor | strip_html | upcase | truncate: 1, '' %} | |
{% unless first_letter == current %} | |
<li class="vendor-letter">{{ first_letter }}</li> | |
{% endunless %} | |
<li>{{ product_vendor | link_to_vendor }}</li> | |
{% assign current = first_letter %} | |
{% endfor %} |
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_saving = 0 %} | |
{% for item in cart.items %} | |
{% if item.variant.compare_at_price > item.variant.price %} | |
{% capture saving %}{{ item.variant.compare_at_price | minus: item.variant.price }}{% endcapture %} | |
{% assign total_saving = saving | plus: total_saving %} | |
{% endif %} | |
...rest of cart code within for loop | |
{% endfor %} | |
Display saving: |