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
This is a cool way to add a gist! |
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
<!-- Global site tag (gtag.js) - Google Analytics --> | |
<script async src="https://www.googletagmanager.com/gtag/js?id=G-5GE0TR6RDZ"></script> | |
<script> | |
let args = { | |
'event': "orderconfirmation", | |
'discount': '{{ order.total_discounts }}', | |
'shippingPrice': '{{ order.shipping_price | money_without_currency | replace: ",", "." }}', | |
'transactionTax': '{{ order.tax_price | money_without_currency | replace: ",", "." }}', | |
'transactionSubtotal': '{{ order.subtotal_price | money_without_currency | replace: ",", "." }}', |
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 performanceCookieCategory = '2,'; | |
function waitForOneTrust() { | |
hasOneTrustLoaded(); | |
let attempts = 0; | |
const interval = setInterval(function () { |
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
require('isomorphic-fetch'); | |
const dotenv = require('dotenv'); | |
const Koa = require('koa'); | |
const next = require('next'); | |
const { default: createShopifyAuth } = require('@shopify/koa-shopify-auth'); | |
const { verifyRequest } = require('@shopify/koa-shopify-auth'); | |
const session = require('koa-session'); | |
dotenv.config(); |
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
//called in initVariants | |
_handleColourAvailability: function(data) { | |
if(this.variantRadios){ | |
var variants = data.product.variants; | |
var coloursAvailable = {}; | |
variants.forEach( variant => { | |
if(variant.available){ | |
coloursAvailable[variant.option1] = true; | |
} |