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>if (typeof Shopify === "undefined") var Shopify = {}; Shopify.cart = {{ cart | json }};</script> | |
{% assign all_items_count = 0 %} | |
{% assign discount_line_total = 0 %} | |
{% if cart.item_count > 0 %} | |
{% for item in cart.items %} | |
{{ item.title }} |
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 object = block.settings.url -%} | |
{%- if object -%} | |
{%- if object.type == 'page_link' -%} | |
{%- assign object = block.settings[link] | remove: '/pages/' -%} | |
{%- assign title = pages[object].title -%} | |
{%- elsif object.type == 'collection_link' -%} | |
{%- assign object = block.settings[link] | remove: '/collections/' -%} | |
{%- assign title = collections[object].title -%} | |
{%- elsif object.type == 'product_link' -%} |
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 %} | |
To add a companion product to the cart automatically if a primary product is in cart: | |
1. Create a new link list under your Navigation tab. | |
2. In that link list, make the first link point to companion product. | |
3. Copy your link list handle where indicated at line 9 | |
4. Set the minimum cart total required for the bonus product on line 10 | |
{% endcomment %} | |
{% assign linklist = linklists['put-your-link-list-handle-here'] %} | |
{% assign min_total = 100 %} |
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
// Check each URL parameter | |
function GetURLParameter(sParam) | |
{ | |
var sPageURL = window.location.search.substring(1); | |
var sURLVariables = sPageURL.split('&'); | |
for (var i = 0; i < sURLVariables.length; i++) | |
{ | |
var sParameterName = sURLVariables[i].split('='); | |
if (sParameterName[0] == sParam) | |
{ |
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 preorders = 0 %} | |
{% for item in cart.items %} | |
{% if item.product.tags contains 'coming-soon' %} | |
{% capture preorders %}{{ preorders | plus: 1 }}{% endcapture %} | |
{% endif %} | |
{% endfor %} | |
{% if cart.item_count == 0 %} | |
{% if product.tags contains 'coming-soon' %} | |
<input type="submit" name="add" id="add" value="Pre-order Now" class="purchase button"> |
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 class="brands"> | |
{% for link in linklists.brands.links %} | |
{% unless link.object.image.src == blank %} | |
<li> | |
<a href="{{ link.object.url }}" title="{{ link.object.title | escape }}"> | |
<img src="{{ link.object.image.src | collection_img_url: 'medium' }}" alt="{{ link.object.title | escape }}" /> | |
</a> | |
</li> | |
{% 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
<!DOCTYPE html> | |
<html> | |
<title>Fancy</title> | |
<script> | |
// Watch the extension for a trigger | |
safari.application.addEventListener("command", performCommand, false); | |
// Do something when triggered | |
function performCommand(event) { | |
// Pass that command we created before to this 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
{% assign linklist = linklists['order-form'] %} | |
<form> | |
<table cellspacing="0" cellpadding="0" border="1"> | |
<tbody> | |
<tr id="cart-headlines"> | |
<td class="cart-thumb"> </td> | |
<td class="cart-title">Product Title</td> | |
<td class="cart-unitprice">Price</td> | |
<td class="cart-quantity">Quantity</td> | |
</tr> |