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 template contains 'collection' and current_tags %} | |
<meta name="robots" content="noindex" /> | |
<link rel="canonical" href="{{ collection.url }}" /> | |
{% else %} | |
<link rel="canonical" href="{{ canonical_url }}" /> | |
{% 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
{% if template == '404' %} | |
<meta http-equiv="refresh" content="0;URL=http://example.com/collections/404/" /> | |
{% 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
{% capture email_title %}Thank you for your purchase {% endcapture %} | |
{% capture email_body %} | |
<p>Hi {{ customer.first_name }}</p> | |
<p>A great big thank you for shopping with {{ shop_name }}</p> | |
<p>We value your opinion, and we'd love to hear your feedback</p> | |
<p>If you have 47 seconds to answer two quick questions, we'd be very grateful if you could <b>hit reply & tell us:</b></p> | |
<ol style="color:#777777;"> | |
<li>What type of person do you think would benefit most from {{ shop.name }}?</li> | |
<li>Why would you recommend {{ shop.name }}? In other words, what benefit would someone get from {{ shop.name }}?</li> | |
</ol> |
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 billing_address.first_name %}Hi {{ billing_address.first_name }}, | |
{% elsif shipping_address.first_name %}Hi {{ shipping_address.first_name }},{% endif %} | |
<p>Friendly check-in from {{ shop.name }}.</p> | |
<p>I saw you put together a shopping cart on our site but didn’t finish your order.</p> | |
<p>Did you need any help? Or did you have any questions about the order I can answer before you submit it?</p> | |
<p>If there’s anything I can do, just hit the reply button and drop me a line with any product or order questions.</p> | |
<p>{{ custom_message }}</p> | |
<p>I’ve included a list of your shopping cart contents below. You can click this link to load up the shopping cart again.</p> | |
<p><b><a href="{{ url }}">Your cart:</a></b></p> | |
<table class="row"> |
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 cart.total_price < 5000 %} | |
<p>You're <span>{{ 5000 | minus: cart.total_price | money }}</span> away from receiving free shipping on your order!</p> | |
{% else %} | |
<p><b>FREE SHIPPING</b></p> | |
{% 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
discount_message = "" | |
discount = 0.999999999999 # It won't actually work with only 1 item in cart unless it calculates a different total, discount * 1 will simply not do anything | |
total_items = 0 | |
Input.cart.line_items.each do |line_item| | |
total_items += line_item.quantity | |
end | |
case total_items | |
when 0 | |
discount_message = "Add something to your cart!" |
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
DISCOUNT_PERCENT=30 | |
CART_DISCOUNT_MESSAGE="Buy 2 or more items and get 30% off the least expensive item" | |
eligible_items = Input.cart.line_items.select do |line_item| | |
product = line_item.variant.product | |
!product.gift_card? | |
end | |
# Sort eligible items by price, least exensive first |
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
discount_product_ids = [10593412163,301378967] # Enter qualifying product_id | |
free_product_id = 359354662944 | |
valid_product = false | |
Input.cart.line_items.each do |line_item| | |
product = line_item.variant.product | |
valid_product = true if (discount_product_ids.include?(product.id) or valid_product) | |
end | |
if valid_product |
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
FREEBIE_PRODUCT_ID = 6621649541 | |
CART_TOTAL_FOR_DISCOUNT_APPLIED = Money.new(cents: 100) * 100 | |
DISCOUNT_MESSAGE = "Get a FREE gift for ordering $100 or more" | |
freebie_in_cart = false | |
cart_price_exceeds_discounted_freebie_amount = false | |
cost_of_freebie = Money.zero | |
# Test if the freebie is in the cart, also get its cost if it is so we can deduct from the cart total | |
Input.cart.line_items.select do |line_item| |
OlderNewer