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
<script> | |
Shopify.Cart = Shopify.Cart || {}; | |
Shopify.Cart.DeliveryCharge = {}; | |
Shopify.Cart.DeliveryCharge.set = function(data) { | |
jQuery.ajax({ | |
type: 'POST', | |
url: '/cart/update.js', |
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
{{ '//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css' | stylesheet_tag }} | |
<style> | |
.edit-tool { | |
float: right; | |
position: fixed; | |
right: 0; | |
top: 70px; | |
background-color: white; | |
padding: 5px 10px; | |
-webkit-box-shadow: -1px 0px 3px 0px rgba(50, 50, 50, 0.6); |
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
{% assign articles = blogs.news.articles | sort: 'title' %} | |
{% for article in articles %} | |
{{ article.title }} | |
{% endfor %} |
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
var optionSelectors = new Shopify.OptionSelectors... | |
// Grab the variant currently selected with ?variant=ID in the URL, or the first in stock variant, on page load. | |
optionSelectors.selectVariant({{ product.selected_or_first_available_variant.id }}); |
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> | |
<label>Sort by</label> | |
<select class="sortBy"> | |
<option value="price-ascending">Price: Low to High</option> | |
<option value="price-descending">Price: High to Low</option> | |
<option value="title-ascending">A-Z</option> | |
<option value="title-descending">Z-A</option> | |
<option value="created-ascending">Oldest to Newest</option> | |
<option value="created-descending">Newest to Oldest</option> | |
<option value="best-selling">Best Selling</option> |
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 (location.protocol !== "https:") { | |
location.protocol = 'https:'; | |
} |
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
<script> | |
Shopify.queryParams = {}; | |
if (location.search.length) { | |
for (var aKeyValue, i = 0, aCouples = location.search.substr(1).split('&'); i < aCouples.length; i++) { | |
aKeyValue = aCouples[i].split('='); | |
if (aKeyValue.length > 1) { | |
Shopify.queryParams[decodeURIComponent(aKeyValue[0])] = decodeURIComponent(aKeyValue[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
<div> | |
<label for="sort-by">Sort by</label> | |
<select id="sort-by"> | |
<option value="manual">Featured</option> | |
<option value="price-ascending">Price: Low to High</option> | |
<option value="price-descending">Price: High to Low</option> | |
<option value="title-ascending">A-Z</option> | |
<option value="title-descending">Z-A</option> | |
<option value="created-ascending">Oldest to Newest</option> | |
<option value="created-descending">Newest to Oldest</option> |
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 template contains 'product' %} | |
<script> | |
jQuery(function($) { | |
$('form[action="/cart/add"]').submit(function() { | |
var formIsValid = true; | |
var message = "Please fill this out and you will be able to add the item to your cart."; | |
$(this).find('[name^="properties"]').filter('.required, [required="required"]').each(function() { | |
$(this).removeClass('error'); | |
if (formIsValid && $(this).val() == '') { | |
formIsValid = false; |
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
<!-- Only 1 step --> | |
<!-- Replace this code for the featured image in templates/product.liquid --> | |
{% if product.featured_image %} | |
<img id="feature-image" class="desktop" src="{{ product.featured_image.src | product_img_url: 'master' }}" alt="Product Image" data-zoom-image="{{ product.featured_image.src | product_img_url: 'master' }}" alt="{{ product.featured_image.alt | escape }}" /> | |
<img class="mobile" src="{{ product.featured_image.src | product_img_url: 'grande' }}" alt="{{ product.featured_image.alt | escape }}" /> | |
{% if on_sale == true %}<div class="sale">Sale</div>{% endif %} | |
{% endif %} |