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
.cart-upsell { | |
padding: 20px; | |
text-align: center; | |
margin: 20px; | |
border: 2px solid #e28413; | |
border-radius: 5px; | |
} | |
.cart-upsell-row { | |
display: -webkit-flex; | |
display: flex; |
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
# Rush Order | |
Input.cart.line_items.each do |line_item| | |
product = line_item.variant.product | |
next unless product.id == 12097978371 | |
subtotal_without_item = Input.cart.subtotal_price_was - line_item.line_price | |
line_item.change_line_price(subtotal_without_item * 0.2, message: "Rush Order fee is 20%") | |
end | |
Output.cart = Input.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
<script> | |
$('.readmore').click(function (event) { | |
event.preventDefault(); | |
var descriptionFull = document.querySelector('.product-description-full'); | |
descriptionFull.style.display = 'block'; | |
var descriptionShort = document.querySelector('.product-description-short'); | |
descriptionShort.style.display = 'none'; | |
}); | |
$('.readless').click(function (event) { | |
event.preventDefault(); |
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.description.size > 700 %} | |
<div class="product-description-short"> | |
{{ product.description | truncate: 500, ". . . " }}<a class="readmore" href="#">Show More ></a> | |
</div> | |
<div class="product-description-full"> | |
{{ product.description }} | |
<br><a class="readless" href="#">< Show Less</a> | |
</div> | |
{% else %} | |
{{ product.description }} |
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.metafields.product_meta.short_title %} | |
{{ product.metafields.product_meta.short_title }} | |
{% else %} | |
{{ product.title }} | |
{% 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
{{ product.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 current_variant = product.selected_or_first_available_variant %} | |
<script type="application/ld+json"> | |
{ | |
"@context": "http://schema.org/", | |
"@type": "Product", | |
"@id": "{{ shop.url | append: '/products/' | append: product.handle }}", | |
"url": "{{ shop.url | append: '/products/' | append: product.handle }}", | |
"name": "{{ product.title }}", | |
"image": "{{ product.featured_image.src | img_url: 'master' }}", |
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
<div id="discount-message"></div> | |
<script type="text/javascript"> | |
var codeCookieValue; | |
var getCookie = function(name) { | |
var value = "; " + document.cookie; | |
var parts = value.split('; '+name+'='); | |
if (parts.length == 2) return parts.pop().split(";").shift(); | |
}; | |
codeCookieValue = getCookie('discount_code'); |
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
.show-discount { | |
text-align: center; | |
background-color: #b7b8c4; | |
} | |
.show-discount span { | |
color: red; | |
font-weight: bold; | |
} |
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
<button type="submit" name="add" class="action_button add_to_cart {% if show_payment_button %} action_button--secondary {% endif %}" data-label={{ add_to_cart_label | json }}> | |
{% if product.tags contains 'Cross-Sell-A' %} | |
<input type="hidden" name="return_to" value="/pages/cross-sell-a" /> | |
{% endif %} | |
{% if product.tags contains 'Cross-Sell-B' %} | |
<input type="hidden" name="return_to" value="/pages/cross-sell-b" /> | |
{% endif %} | |
<span class="text">{{ add_to_cart_label }}</span> |