Christenson - Acid Phish

 
(function() var CONFIGURATOR URL = "https://sales.shapersportal.app/configurator?shape id=6a97cc60e38c2faf6a1d86a7&v=1789799153169&app id=6a026ac871b32618c4472776"; var DRAFT ORDER URL = "https://sales.shapersportal.app/functions/createDraftOrder"; var VOID ORDER URL = DRAFT ORDER URL.replace('createDraftOrder', 'voidDraftOrder'); var SHAPE ID = "6a97cc60e38c2faf6a1d86a7"; var submitting = false; // The board the buyer has configured but not yet paid for. Kept on the page // (window.SpBoard) and in localStorage so the theme can show it in its own // cart panel with "Go to checkout" and "Remove board" — and so a week-old // config never resurfaces as an item the buyer can't get rid of. var STORE KEY = 'sp pending board ' SHAPE ID; function readPending() try var saved = JSON.parse(localStorage.getItem(STORE KEY) 'null'); if (!saved !saved.invoice url) return null; if (saved.expires at && new Date(saved.expires at).getTime() < Date.now()) localStorage.removeItem(STORE KEY); return null; return saved; catch(e) return null; function savePending(v) try localStorage.setItem(STORE KEY, JSON.stringify(v)); catch(e) window.SpBoard = shapeId: SHAPE ID, get: readPending, // Voids the draft order in Shopify, then forgets it locally. remove: function() var p = readPending(); try localStorage.removeItem(STORE KEY); catch(e) if (!p !p.draft order id) return Promise.resolve( ok: true ); return fetch(VOID ORDER URL, method: 'POST', headers: 'Content-Type': 'application/json', 'Accept': 'application/json' , body: JSON.stringify( shape id: SHAPE ID, draft order id: p.draft order id ) ).then(function(r) return r.json().catch(function() return ; ); ); , checkout: function() var p = readPending(); if (p) window.top.location.href = p.invoice url; ; // Drop an expired saved board on load. readPending(); // Un-clip only ancestors that actually CLIP the iframe (overflow hidden/clip // or a max-height). NEVER touch scrollable containers (overflow auto/scroll) // — some themes (e.g. Horizon) scroll the page through an inner wrapper, and // forcing it to overflow:visible kills page scrolling entirely. function clearClipping(f) var p = f.parentElement; while (p && p !== document.body) var cs = window.getComputedStyle(p); var oy = cs.overflowY; if (oy === 'hidden' oy === 'clip') p.style.overflow = 'visible'; p.style.maxHeight = 'none'; p.style.height = 'auto'; else if (cs.maxHeight !== 'none') p.style.maxHeight = 'none'; p = p.parentElement; // Resolve the buyer's SELECTED country from Shopify's storefront (the // currency/country dropdown), so the configurator prices for the country the // buyer picked rather than their geo-IP. Shopify exposes the active country // on window.Shopify.country (ISO-2). Fall back to nothing → the configurator // uses geo-IP. Append it as a ?country= param on the iframe src. function buyerCountry() try if (window.Shopify && window.Shopify.country) return String(window.Shopify.country).toUpperCase(); catch(e) return ''; // Carry through the build options the customer arrived with (e.g. a quick // order link from a board wall: ?only=stock dims,hardware&blank=pu), plus // their saved surfer details and any retail referral code. function passThroughParams() var keep = 'only','blank','prefs','ref','resume','height','weight','ability','unit','voucher','consult' ; var qs = new URLSearchParams(window.location.search); var out = ''; keep.forEach(function(k) var v = qs.get(k); if (v) out = '&' k '=' encodeURIComponent(v); ); return out; // Read the store page's fonts and colours (the nearest painted background // behind the embed, the body text colour, a heading font and a theme button) // and post them into the configurator so it styles itself to match. function postTheme() var f = document.getElementById('ff-configurator'); if (!f !f.contentWindow) return; var bg = ''; var p = f.parentElement; while (p) var c = getComputedStyle(p).backgroundColor; if (c && c !== 'rgba(0, 0, 0, 0)' && c !== 'transparent') bg = c; break; p = p.parentElement; var b = getComputedStyle(document.body); var h = document.querySelector('h1,h2'), hs = h ? getComputedStyle(h) : null; var btn = document.querySelector('button,.button,.btn,a class ="button" '), bs = btn ? getComputedStyle(btn) : null; f.contentWindow.postMessage( type: 'sp embed theme', font: b.fontFamily, headingFont: hs ? hs.fontFamily : '', color: b.color, bg: bg b.backgroundColor, accent: bs ? bs.backgroundColor : '', accentColor: bs ? bs.color : '' , ' '); (function() var f = document.getElementById('ff-configurator'); if (f) f.addEventListener('load', postTheme); var c = buyerCountry(); f.src = CONFIGURATOR URL (c ? '&country=' encodeURIComponent(c) : '') passThroughParams(); )(); window.addEventListener('message', function(event) var data = event.data ; if (data.type === 'ff ') if (submitting) return; submitting = true; fetch(DRAFT ORDER URL, method: 'POST', headers: 'Content-Type': 'application/json', 'Accept': 'applic
Store:
Verdure
Price:
$1,166
0 0
×