This file contains hidden or 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
| 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 hidden or 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="framing" id="framing"> | |
| <div> | |
| <a href="#frame-gallery-gold" onclick="canvasFraming('gallery-gold','Gallery Gold')"></a> | |
| <p id="gallery-gold" onclick="canvasFraming('gallery-gold','Gallery Gold')">Gallery Gold</p> | |
| </div> | |
| <div> | |
| <a href="#frame-gallery-walnut" onclick="canvasFraming('gallery-walnut','Gallery Walnut')"></a> | |
| <p id="gallery-walnut" onclick="canvasFraming('gallery-walnut','Gallery Walnut')">Gallery Walnut</p> | |
| </div> | |
| <div> |
This file contains hidden or 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 name="add-to-cart" id="add-to-cart" action="/cart/add" method="post" onsubmit="return formCheck()"> | |
| {% if product.variants.size > 1 %} | |
| {% if product.options[0] %} | |
| {% assign used = '' %} | |
| <div class="select" id="parent-1"> | |
| <div class="title" id="title-1" onclick="productOptions('child-1','parent-1')"> | |
| {% unless template contains 'canvas' %}Select {% endunless %}{% if product.options.size > 1 %}{{ product.options[0] }}{% endif %} | |
| </div> <!-- end .title --> | |
| <div class="options-child" id="child-1"> |
This file contains hidden or 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 %} |
This file contains hidden or 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 hidden or 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 variant in product.variants %} | |
| {% assign qty = qty | plus:variant.inventory_quantity %} | |
| {% endfor %} | |
| {% if qty > 0 %} | |
| <label>Quantity ({{ qty}} available):</label> | |
| <input type="text" name="quantity" id="quantity" value="1" onclick="this.select()" onkeyup="qtyCheck(this.value)" /> | |
| <button type="submit">add to cart</button> | |
| {% else %} | |
| <p>Sorry, this is temporarily unavailable.</p> |
This file contains hidden or 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
| // Replace this | |
| <meta property="og:price:amount" content="15.00" /> | |
| <meta property="og:price:currency" content="USD" /> | |
| // With this | |
| {% assign price = product.price_max %} | |
| {% for v in product.variants %} | |
| {% unless v.title contains 'wholesale' or v.title contains 'Wholesale' or v.price > price %} | |
| {% assign price = v.price %} | |
| {% endunless %} |
This file contains hidden or 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
| http://docs.shopify.com/manual/configuration/store-customization/page-specific/cart-page/cart-permalinks | |
| {% capture checkout %} | |
| {% for item in cart.items %} | |
| {{ item.variant.id }}:{{ item.quantity }}{% unless forloop.last %},{% endunless %} | |
| {% endfor %} | |
| {% endcapture %} | |
| <a href="/cart/{{ checkout }}">checkout</a> |
This file contains hidden or 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
| <input type="checkbox" id="product" onchange="searchType('product')" /> Products<br /> | |
| <input type="checkbox" id="article" onchange="searchType('article')" /> Blog Posts<br /> | |
| <input type="checkbox" id="page" onchange="searchType('page')" /> Pages<br /> | |
| <input type="checkbox" id="all" onchange="searchType('all')" /> All<br /> | |
| <form id="search-form" name="search" action="/search"> | |
| <input type="hidden" id="type" name="type" value="" /> | |
| <input type="text" id="q" name="q" value="" class="search replace" title="Search" /> | |
| <button type="submit" id="search-submit">search</button> | |
| </form> | |
| <script type="text/javascript"> |