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
<!-- Start GTM dataLayer --> | |
{% if order_id != blank %} | |
<script> | |
const Nativve = window.Nativve || {}; | |
// Assign the data for ecommerce dataLayer | |
Nativve.ecommerce = { | |
transaction_id: {{ order_number | json }}, | |
value: "{{ total_price | times: 0.01 | 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
<!-- Google Tag Manager --> | |
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': | |
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], | |
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= | |
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); | |
})(window,document,'script','dataLayer','{{ id }}');</script> | |
<!-- End Google Tag Manager --> | |
<script> | |
(() => { |
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
import esbuild from "esbuild"; | |
import { sassPlugin } from "esbuild-sass-plugin"; | |
import postcss from "postcss"; | |
import autoprefixer from "autoprefixer"; | |
import postcssPresetEnv from "postcss-preset-env"; | |
esbuild | |
.build({ | |
entryPoints: { | |
theme: "src/scripts/theme.js", |
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
<style> | |
.custom-upsell-products { | |
display: grid; | |
grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); | |
gap: 1rem; | |
} | |
custom-upsell-product { | |
overflow-x: hidden; | |
} |
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
export function _$(selector, scope = document) { | |
return scope.querySelector(selector); | |
} | |
export function _$$(selector, scope = document) { | |
return Array.from(scope.querySelectorAll(selector)); | |
} | |
export function wrap(el, wrapper) { | |
el.parentNode.insertBefore(wrapper, el); |