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('#product-select').change(function() { | |
var variantTitle = jQuery(this).find(':selected').text(); | |
jQuery('.thumbs img[alt=' + variantTitle + ']').trigger('click'); | |
}) | |
</script> |
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> | |
{% for collection in collections %} | |
{% unless collection.products_count == 0 %} | |
<li> | |
{{ collection.title | link_to: collection.url }} | |
{% if collection.all_tags.size > 0 %} | |
<ul> | |
{% for tag in collection.all_tags %} | |
{% capture url %}{{ collection.url }}/{{ tag | handle }}{% endcapture %} | |
<li>{{ tag | link_to: url }}</li> |
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 %} | |
Put the code below in a new snippet called relevant-articles.liquid. Include that snippet in product.liquid using {% include 'relevant-articles' %}. | |
Edit how many articles maximum you want to show by editing the how_many_articles_to_show variable assignment near the top. | |
Requirement: whenever you are blogging and you happen to say something that is relevant to product A or product B, add the title of those products as tags to your blog post. | |
For example, if you are writing about how you have been working on improving a product called 'Gizmo', then add 'Gizmo' as tag to your blog post. | |
{% 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
{% for product in collection.products %} | |
{% assign hide_product = false %} | |
{% assign size_index = 0 %} | |
{% for option in product.options %} | |
{% if option == 'Size' %} | |
{% assign size_index = forloop.index0 %} | |
{% endif %} | |
{% 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
<fieldset> | |
<legend>Your pack product</legend> | |
<table style="clear:both"> | |
<tr> | |
<td><label for="pack_quantity">How many items in the pack?</label></td> | |
<td> | |
<select id="pack_quantity" name="pack_quantity"> | |
<option value="2">2</option> | |
<option value="3">3</option> | |
<option value="4">4</option> |
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 number_of_picks = settings.pack_quantity %} | |
{% assign flavors = settings.pack_flavors | strip_newlines | replace: ' ,', ',' | replace: ' , ', ',' | replace: ', ', ',' %} | |
{% assign flavor_array = flavors | split: ',' %} | |
<table> | |
<tr> | |
<th>Flavors</th> | |
{% for i in (1..number_of_picks) %} | |
<th>{{ i }}</th> | |
{% endfor %} | |
</tr> |
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 id="reorder-drop-down" style="margin-top:10px; background-color:#e8e8e8; padding:10px; overflow:hidden"> | |
<label style="display:inline; color: #777; font-size: 12px; font-weight: normal">Reorder this collection</label> | |
<select id="reorder-options" name="reorder-options"> | |
<option value="alpha-asc"{% if collection.handle contains 'alpha-asc' %} selected="selected"{% endif %}>Alphabetically: A-Z</option> | |
<option value="alpha-desc"{% if collection.handle contains 'alpha-desc' %} selected="selected"{% endif %}>Alphabetically: Z-A</option> | |
<option value="best-selling"{% if collection.handle contains 'best-selling' %} selected="selected"{% endif %}>By Best Selling</option> | |
<option value="created-desc"{% if collection.handle contains 'created-desc' %} selected="selected"{% endif %}>By Created Date: Newest to Oldest</option> | |
<option value="created-asc"{% if collection.handle contains 'created-asc' %} selected="selected"{% endif %}>By Created Date: Oldest to Newest</option> | |
<optio |
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 %} | |
Edit the 2 values right below: what's your blog handle and how many articles do you want to show? | |
{% endcomment %} | |
{% assign your_blog_handle_here = 'news' %} | |
{% assign how_many_articles_to_show = 5 %} | |
<!-- START OF LATEST BLOG POSTS --> |
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
{{ '//code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css' | stylesheet_tag }} | |
{{ '//ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js' | script_tag }} | |
<div style="width:300px; clear:both;"> | |
<p> | |
<label for="date">Pick a delivery date:</label> | |
<input id="date" type="text" name="attributes[date]" value="{{ cart.attributes.date }}" /> | |
<span style="display:block" class="instructions"> We do not deliver during the week-end.</span> | |
</p> | |
</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
<script type="text/javascript" charset="utf-8"> | |
//<![CDATA[ | |
jQuery(function() { | |
jQuery(window).unload(function() { | |
var params = { | |
type: 'POST', | |
url: '/cart/update.js', | |
data: jQuery('form[action="/cart"]').serialize(), | |
dataType: 'json', | |
async: false |