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 section.settings.main_image != blank -%} | |
{%- assign focal_point = section.settings.main_image.presentation.focal_point -%} | |
{%- capture focal_point_css -%} | |
{%- if focal_point != blank -%} | |
style="object-position:{{ focal_point.x }}% {{ focal_point.y }}%;" | |
{%- endif -%} | |
{%- endcapture -%} | |
<div class="collection-banner--img img-cover"> | |
<img class="lazyload" data-src="{{ section.settings.main_image | img_url: 'master' }}" alt="Banner" {{ focal_point_css }}> | |
</div> |
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> | |
const cartRoute = '{{ routes.cart_url | append: '.js' }}'; | |
function forceCartUpdate() { | |
var getCartForce = function() { | |
var url = ''.concat(cartRoute, '?t=').concat(Date.now()); | |
return fetch(url, { | |
credentials: 'same-origin', | |
method: 'GET' | |
}).then(response => response.json()); |
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
# ================================ Customizable Settings ================================ | |
# ================================================================ | |
# Spend $X, get Product Y for Z Discount | |
# | |
# If the cart total is greater than (or equal to) the entered | |
# threshold (less the discounted amount), the entered number of | |
# matching items is discounted by the entered amount. | |
# | |
# - 'product_selector_match_type' determines whether we look for | |
# products that do or don't match the entered selectors. Can |
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
<!-- https://prnt.sc/f05LCS_YIdZq --> | |
<div class="product-hero"> | |
<div class="product-media__wrapper"> | |
Product media | |
</div> | |
<div class="product__info"> | |
Product info | |
</div> |
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 ('createEvent' in document) { | |
var evt = document.createEvent('HTMLEvents'); | |
evt.initEvent('change', false, true); | |
inputRadioDOMelement.dispatchEvent(evt); | |
} |
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
// Add item to the cart | |
function cartItemAdd(id, qty) { | |
fetch('/cart/add.js', { | |
method: 'POST', | |
credentials: 'same-origin', | |
headers: { | |
'Content-Type': 'application/json', | |
'X-Requested-With': 'XMLHttpRequest' | |
}, | |
body: JSON.stringify({'items': [{'id':id,'quantity':qty}]}) |
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 text_rows = text | newline_to_br | split: '<br />' -%} | |
{%- for row in text_rows -%} | |
{{ row }} | |
{%- 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
<div class="ruk_rating_snippet" data-sku="{{ product.handle }};{{ product.variants | map: 'sku' | join: ';' }};{{ product.variants | map: 'id' | join: ';' }}"></div> |
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
# ================================ Customizable Settings ================================ | |
# ================================================================ | |
# Disable Discount Code(s) For Products | |
# | |
# If any matching discount codes are used, and any matching items | |
# are in the cart, the discount code is rejected with the entered | |
# message. | |
# | |
# - 'discount_code_match_type' determines whether the below | |
# strings should be an exact or partial match. Can be: |
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 class="absolute-cover video-cover controlled-video autoplayLazyVideo"> | |
<video | |
{% if img != blank %} | |
poster="{{ img.src }}" | |
{% endif %} | |
playsinline | |
loop | |
muted> | |
<source | |
src="{{ video.src }}" |