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 %}Necessary HTML elements{% endcomment %} | |
{%- if settings.discount_code_topbanner != blank -%} | |
<div class="dCodePDPTopBanner d-none"> | |
Dein Rabattcode <strong class="dCodeName">testAmount_20</strong> wurde aktiviert. Du sparst <strong class="dCodePercent">20</strong>% auf deinen Einkauf! | |
</div> | |
{%- endif -%} | |
<span class="savingsBadge" | |
data-raw-price="{{ variant.price }}" | |
data-raw-comp-price="{{ variant.compare_at_price }}"> |
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="pdp-upsells--panel-row"> | |
{%- for prod in metafield -%} | |
{%- assign first_variant = prod.variants[0] -%} | |
{%- assign visibility_class = '' -%} | |
<div class="pdp-upsells--cell"> | |
<div class="pdp-upsells--item"> | |
<div class="pdp-upsells--item-image img-contain"> | |
{%- if prod.featured_image != blank -%} | |
<img | |
loading="lazy" |
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
{% assign entries = shop.metaobjects.pdp_buybox_advantages['pdp-buybox-advantages']['advantages'].value %} | |
{%- for item in entries -%} | |
{%- assign image = item.image.value -%} | |
{%- assign text = item.text.value -%} | |
{%- endfor -%} |
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="countTimer" data-date="01 Jan 2030 00:00:00 GMT"> | |
<div class="countdown-wrapper"> | |
<div class="countdown-cell"> | |
<span class="timer-number tDays">00</span> | |
<div class="timer-caption">Days</div> | |
</div> | |
<div class="countdown-cell">·</div> | |
<div class="countdown-cell"> | |
<span class="timer-number tHours">00</span> | |
<div class="timer-caption">hours</div> |
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
{%- 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 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
<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 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
# ================================ 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 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
<!-- 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 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
if ('createEvent' in document) { | |
var evt = document.createEvent('HTMLEvents'); | |
evt.initEvent('change', false, true); | |
inputRadioDOMelement.dispatchEvent(evt); | |
} |
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
// 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}]}) |