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
@percent = Decimal.new(40) / 100.0 | |
Input.cart.line_items.each do |line_item| | |
product = line_item.variant.product | |
next if product.gift_card? | |
next unless product.tags.include?('hugesale') | |
line_discount = line_item.line_price * @percent | |
line_item.change_line_price(line_item.line_price - line_discount, message: "HUGESALE! 40% off this item!") | |
end | |
Output.cart = Input.cart |
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
<tfoot class="summary"> | |
<tr> | |
<td colspan="2">Subtotal</td> | |
<td>{{ cart.original_total_price | money }}</td> | |
</tr> | |
<tr> | |
<td colspan="2">Discount Savings</td> | |
<td>{{ cart.total_discount | money }}</td> | |
</tr> | |
<tr> |
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
<tbody class="line-items"> | |
{% for item in cart.items %} | |
<tr> | |
<td>{{ item.product.title }}</td> | |
<td>{{ item.quantity }}</td> | |
<td> | |
{{ item.line_price }} | |
{% if item.total_discount > 0 %} | |
<s>{{ item.original_line_price }}</s> | |
( {{ item.message }} ) |
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
<table class="cart"> | |
<thead class="heading"> | |
<tr> | |
<th>Product</th> | |
<th>Quantity</th> | |
<th>Total</th> | |
</tr> | |
</thead> | |
<tbody class="line-items"> |
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="swatchslider"> | |
<ul class="slides product-swatches-{{product.id}}"></ul> | |
</div> | |
<div style="clear:both;"></div> | |
<script> | |
/*$(window).load(function() { | |
$('.swatchslider').flexslider({ | |
animation: "slide", | |
animationLoop: 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
<!-- | |
Simple method for detecting an Admin in Shopify using liquid. | |
Quick code by jason at freakdesign.com.au | |
Related Blog post: http://freakdesign.com.au/blogs/news/34154561 | |
--> | |
{% capture CFH %}{{ content_for_header }}{% endcapture %}{{ CFH }} | |
{% if CFH contains 'admin_bar_iframe' %} |
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="product-swatches-{{product.id}}"></div> | |
<div style="clear:both;"></div> | |
<script> | |
jQuery(document).ready(function(){ | |
var appDomain = '//productswatches.herokuapp.com'; | |
var url = appDomain + '/product_swatches/get-json/{{product.id}}'; | |
var data = { | |
return_format: 'html', | |
product_id:'{{product.id}}', | |
tooltip: 'yes', |
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 id="section-inspiration"> | |
<ul class="inspiration-images"> | |
<li class="inspiration-1"><img src="#" class="inspiration-image fade-in" /></li> | |
<li class="inspiration-1"><img src="#" class="inspiration-image fade-in" /></li> | |
<li class="inspiration-1"><img src="#" class="inspiration-image fade-in" /></li> | |
<li class="inspiration-1"><img src="#" class="inspiration-image fade-in" /></li> | |
<li class="inspiration-1"><img src="#" class="inspiration-image fade-in" /></li> | |
<li class="inspiration-1"><img src="#" class="inspiration-image fade-in" /></li> |
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
<link href='//pressify.s3.amazonaws.com/assets/fancybox/source/jquery.fancybox.css' rel='stylesheet' type='text/css'> | |
<script src="//pressify.s3.amazonaws.com/assets/fancybox/source/jquery.fancybox.js" type="text/javascript"></script> | |
<script src="//npmcdn.com/[email protected]/dist/masonry.pkgd.min.js"></script> | |
<script src="//npmcdn.com/[email protected]/imagesloaded.pkgd.min.js"></script> | |
<link href='//pressify.s3.amazonaws.com/assets/bxslider/jquery.bxslider.css' rel='stylesheet' type='text/css'> | |
<script src="//pressify.s3.amazonaws.com/assets/bxslider/jquery.bxslider.min.js"></script> | |
<div class="lookbook_details" style=""></div> | |
<script> | |
jQuery(document).ready(function(){ | |
// app domain |
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
{% comment %} | |
Source: https://gist.github.com/carolineschnapp/9122054 | |
If you are not on a collection page, do define which collection to use in the order form. | |
Use the following assign statement, replace 'your-collection-handle-here' with your collection handle. | |
{% assign collection = collections.your-collection-handle-here %} | |
Use the assign statement outside of this comment block at the top of your template. | |
{% endcomment %} | |
{% paginate collection.products by 100 %} |