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 member_discount_code = settings.member_discount_code %} | |
{% assign class_discount_code = settings.class_discount_code %} | |
{% assign combined_discount_code = settings.combined_discount_code %} | |
{% if customer %} | |
{% assign customer_tags = customer.tags | join:',' | downcase %} | |
{% if customer_tags contains 'member' %} | |
{% assign member = true %} | |
{% endif %} | |
{% 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
<script type="text/javascript"> | |
function fisherYates ( myArray ) { | |
var i = myArray.length, j, temp; | |
if ( i === 0 ) return false; | |
while ( --i ) { | |
j = Math.floor( Math.random() * ( i + 1 ) ); | |
temp = myArray[i]; | |
myArray[i] = myArray[j]; | |
myArray[j] = temp; | |
} |
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
// Goes in theme.liquid | |
{% if template contains 'contact' %} | |
{{ 'https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js' | script_tag }} | |
<script type="text/javascript"> | |
$(document).ready(function() { | |
var n1 = Math.round(Math.random() * 10 + 1); | |
var n2 = Math.round(Math.random() * 10 + 1); | |
$("#question").val(n1 + " + " + n2); | |
$(".contact-form").submit(function (e) { | |
if (eval($("#question").val()) != $("#answer").val()) { |
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
<form action="/cart/add" method="post"> | |
{% if product.variants.size > 1 %} | |
{% if product.options[0] %} | |
{% assign used = '' %} | |
<label for="select-one">{{ product.options[0] }}</label> | |
<select id='select-one' onchange="letsDoThis()"> | |
{% for variant in product.variants %} | |
{% unless used contains variant.option1 %} | |
<option value="{{ variant.option1 }}">{{ variant.option1 }}</option> | |
{% capture used %}{{ used }} {{ variant.option1 }}{% 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
// config -> settings.html | |
// Make sure you have the same number of quantity breaks as product variants | |
<fieldset> | |
<legend>Quantity Breaks</legend> | |
<table class="standard-table"> | |
<tr><td>Enter quantity breaks in ascending order separated by a comma (e.g. 5, 10, 20, 50)</td><td><input type="text" name="breaks" size="50" /></td></tr> | |
</table> | |
</fieldset> | |
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
// change line 21 from | |
<th>Item</th> | |
// to | |
<th>SKU</th> | |
<th>Item</th> | |
// change line 30 from | |
{% for line_item in line_items %} | |
// to | |
{% assign line_items_by_sku = line_items | sort:'sku' %} |
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
// change line 108 from | |
{% for line_item in line_items_in_shipment %} | |
// to | |
{% assign line_items_by_sku = line_items_in_shipment | sort:'sku' %} | |
{% for line_item in line_items_by_sku %} |
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 customer %} | |
{% for tag in customer.tags %} | |
{% assign t = tag | remove:'x' %} | |
{% unless tags contains t %} | |
{% capture tags %}{{ tags }} {{ t }}{% endcapture %} | |
{% endunless %} | |
{% endfor %} | |
{% for collection in collections %} | |
{% paginate collection.products by collection.all_products_count %} |
NewerOlder