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
<div class="desktop-2 tablet-6 mobile-3" id="aside"> | |
<div id="sidebar"> | |
<div class="desc-accordion"> |
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 section.settings.show_brands_slider %} | |
<div data-section-id="{{ section.id }}" id="slick-{{ section.id }}" class="slickslider brands-responsive{% if section.settings.slideshow_width == 'contained' %} container mb30 {% else %} mt-30 {% endif %}" data-section-type="brands-slideshow-section"> | |
{% for block in section.blocks %} | |
<div class="center brand-slide"> | |
{% if block.settings.brand_link %}<a href="{{ block.settings.brand_link }}">{% endif %} | |
<img src="{{ block.settings.slideshow_image | img_url: '133x' }}" alt="{{ block.settings.slideshow_image.alt }}"> | |
{% if block.settings.brand_link %}</a>{% endif %} | |
</div> | |
{% endfor %} | |
</div> |
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
<!-- here we're going to add a % discount which is a calculation of the sale and product price --> | |
<!-- quite simple - capture the value and then display it --> | |
<!-- see newer version at end --> | |
<!-- capture the % discount --> | |
{% capture discount %} | |
{{ product.compare_at_price_max | minus:product.price | times:100 | divided_by:product.compare_at_price_max }}% <!-- percentage maths --> | |
{% endcapture %} |
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
{% comment %} | |
Here we loop through a blog and use modulo to case odd/even. | |
Dead simple. | |
{% endcomment %} | |
{% for article in blog.articles %} | |
{% assign mod = forloop.index | modulo: 2 %} |
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
{% comment %} | |
Here we have 2 stores: | |
www.urbanexcess.com | |
www.usd.urbanexcess.com | |
set dynamic href lang tags for each to avoid dup. content issues | |
{% endcomment %} |
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
{% capture option_titles %}Color,color,Colour,colour{% endcapture %} | |
<div class="color_swatches_collection"> | |
{% assign option_titles = option_titles | split:',' %} | |
{% for option in product.options %} | |
{% if option_titles contains option %} | |
{% capture option_index %}option{{ forloop.index }}{% endcapture %} | |
{% assign option_values = product.variants | map: option_index | uniq %} | |
{% if option_values.size != 0 %} | |
{% for opt in option_values %} | |
<div style="background-color:{{ opt | downcase }};" class="option_circles"></div> |
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
looping variants: | |
{% for variant in product.variants %} | |
<p>{{ variant.title }}</p> | |
{% endfor %} | |
... more coming soon... | |
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 product_qty = 0 %} | |
{% for variant in product.variants %} | |
{% if variant.inventory_quantity > 0 %} | |
{% assign product_qty = product_qty | plus: variant.inventory_quantity %} | |
{% endif %} | |
{% endfor %} | |
{% assign pre_order = false %} | |
{% comment %}the product is available for sale but has 0 stock - e.g. so is pre-order{% endcomment %} |
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
{% capture option_titles %}Color,color,Colour,colour{% endcapture %} | |
{% assign option_titles = option_titles | split:',' %} | |
{% for option in product.options %} | |
{% if option_titles contains option %} | |
{% capture option_index %}option{{ forloop.index }}{% endcapture %} | |
{% assign option_values = product.variants | map: option_index | uniq %} | |
{% if option_values.size != 1 %} | |
{% for opt in option_values %} |