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
| (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', 'GTM-NDRSNM'); | |
| const script = document.createElement('script'); | |
| script.src = 'https://www.googletagmanager.com/gtag/js?id=AW-963004865'; | |
| script.async = true; | |
| document.head.appendChild(script); |
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
| { | |
| shop { | |
| name | |
| orders(first: 10) { | |
| nodes { | |
| id | |
| ... OTHER FIELDS ... | |
| transactions(first: 10) { | |
| amountSet { | |
| shopMoney { |
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> | |
| // NEW GWP DATA | |
| // https://cdn.shopify.com/s/files/1/0367/5301/products/underwater-camera-check_360x.jpg | |
| {% comment %} | |
| {% assign gwpNew1Product = all_products['sunnylife-luxe-beach-umbrella-more-colors'] %} | |
| {% assign gwpNew2Product = all_products['sunnylife-luxe-beach-umbrella-more-colors'] %} | |
| {% assign gwpNew1Variant = 39835307409507 %} | |
| {% assign gwpNew2Variant = 39835307442275 %} |
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
| const updateAltImage = ({ | |
| variantId, | |
| productImageUrls, | |
| productImageAlts, | |
| images, | |
| }) => { | |
| let image = {}; | |
| const imageRegex = { | |
| activeVariantB: new RegExp(`${variantId}(_([0-9]*_)*)b`), | |
| otherVariantB: new RegExp('[0-9]{1,6}(_([0-9]*_)*)b'), |
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
| async function getInventoryLevelsForProduct(productId) { | |
| if (window.queryapi == false) return; | |
| if (inventoryCache) { | |
| applyInventoryLevels(inventoryCache); | |
| return; | |
| } | |
| const query = ` | |
| { | |
| product(id: "gid://shopify/Product/${productId}") { |
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
| import shipper from 'shopify-shipping-calculator'; | |
| import queryCartProductData from '@/scripts/storefront/queries/queryCartProductData'; | |
| import storefront from '@/scripts/storefront/storefront'; | |
| // Snippets | |
| import '@/scripts/snippets/cart-rewards'; | |
| import '@/scripts/snippets/cart-free-gift'; | |
| /* eslint no-underscore-dangle: 0 */ | |
| class CustomCart extends HTMLElement { |
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
| /** @jsx h */ | |
| /* global globalSwatches */ | |
| import { h } from 'preact' | |
| import { useProduct } from './product-context' | |
| const queryableArray = (array) => { | |
| return array.reduce((acc, current) => { | |
| const key = current.swatchID | |
| delete current.swatchID | |
| acc[key] = current |
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
| <!-- 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); |
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
| import { h } from 'preact'; | |
| import { useEffect } from 'preact/hooks'; | |
| const Reviews = ({ id }) => { | |
| useEffect(() => { | |
| if (window.yotpoWidgetsContainer?.initWidgets) { | |
| window.yotpoWidgetsContainer.initWidgets(); | |
| } | |
| }, [id]); |