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 product.compare_at_price > product.price %} | |
<del>${{ product.compare_at_price | money_without_currency | ceil }}</del> | |
<span class="sale-price"><span itemprop="price">${{ product.price | money_without_currency | ceil }}</span> ({{ product.compare_at_price | minus:product.price | times:100 | divided_by:product.compare_at_price }}% off)</span> | |
{% else %} | |
<span itemprop="price">${{ product.price | money_without_currency | ceil }}</span> | |
{% 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
{% for item in search.results %} | |
{% assign tags = item.tags | join:', ' | downcase %} | |
{% unless tags contains 'search hide' %} | |
// search result | |
{% 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
{% for variant in product.variants %} | |
{% assign option = variant.option1 | downcase %} | |
{% assign p = variant.price | money %} | |
{% unless option contains '+' or option contains 'swatch' %} | |
{% if option contains '1-4' %} | |
{% assign one = p %} | |
{% else %} | |
{% unless option contains '-' %}{% assign one = p %}{% endunless %} | |
{% endif %} | |
{% endunless %} |
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 customer %}{% assign tags = customer.tags | join:' ' | downcase %}{% if tags contains 'wholesale' %}{% assign wholesale = true %}{% endif %}{% endif %} | |
{% if wholesale %} | |
{% if tags contains 'reorder' or customer.orders_count > 0 %}{% assign reorder = true %}{% endif %} | |
{% assign min = settings.cart-min | times:100 | minus:1 %} | |
{% if reorder %}{% assign min = setting.cart-min-reorder | times:100 | minus:1 %}{% endif %} | |
{% endif %} | |
<div class="meta grid"> | |
{% if wholesale %}{% assign total = cart.total_price | divided_by:2 %}{% else %}{% assign total = cart.total_price %}{% endif %} | |
<p>{{ total | money | remove:' ' }}</p> |
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 'blog' or template contains 'article' %} | |
<script type="text/javascript"> | |
window.location = "http://blog.sitename.com"; | |
</script> | |
{% 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 cart.total_price > settings.cart-discount-threshold %}{% assign threshold = true %}{% endif %} | |
<form action="/cart{% if threshold %}/?discount=[discountcode]{% endif %}" method="post"> |
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 options1 %}{% for variant in product.variants %}{{ variant.option1 }},{% endfor %}{% encdapture %} | |
{% assign options1 = options1 | split:',' | uniq %} | |
<select> | |
{% for option in options1 %} | |
<option value="option">{{ option }}</option> | |
{% enfor %} | |
</select> |
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 %} | |
Create product for engraving and add to collection with handle "utility" | |
Add "add-to-cart" class to product form | |
Add "quantity" class to quantity field | |
Create a test for engraving product -- I like adding a product tag | |
{% for tag in product.tags %} | |
{% assign t = tag | downcase %} | |
{% if t contains 'engrave' %}{% assign engrave = true %}{% endif %} | |
{% endfor %} |