Skip to content

Commit

Permalink
Update from Shopify for theme dawn/test290823
Browse files Browse the repository at this point in the history
Committed from shop: Nanshy
  • Loading branch information
shopify[bot] authored Feb 28, 2024
1 parent ba52793 commit c2e18e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/product.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
"custom_liquid_UWhgHd": {
"type": "custom_liquid",
"settings": {
"custom_liquid": "<script src=\"https:\/\/a.klaviyo.com\/media\/js\/onsite\/onsite.js\"><\/script>\n<script>\n var klaviyo = klaviyo || [];\n klaviyo.init({\n account: \"PUBLIC_API_KEY\",\n platform: \"shopify\"\n });\n klaviyo.enable(\"backinstock\",{ \n trigger: {\n product_page_text: \"Notify Me When Available\",\n product_page_class: \"btn\",\n product_page_text_align: \"center\",\n product_page_margin: \"0px\",\n replace_anchor: false\n },\n modal: {\n headline: \"{product_name}\",\n body_content: \"Register to receive a notification when this item comes back in stock.\",\n email_field_label: \"Email\",\n button_label: \"Notify me when available\",\n subscription_success_label: \"You're in! We'll let you know when it's back.\",\n footer_content: '',\n additional_styles: \"@import url('https:\/\/fonts.googleapis.com\/css?family=Helvetica+Neue');\",\n drop_background_color: \"#000\",\n background_color: \"#fff\",\n text_color: \"#222\",\n button_text_color: \"#fff\",\n button_background_color: \"#439fdb\",\n close_button_color: \"#ccc\",\n error_background_color: \"#fcd6d7\",\n error_text_color: \"#C72E2F\",\n success_background_color: \"#d3efcd\",\n success_text_color: \"#1B9500\"\n }\n });\n<\/script>\n<script>\nwindow.addEventListener('load', function() {\nvar _learnq = window._learnq || [];\nfunction addedToCart() {\n fetch(`${window.location.origin}\/cart.js`)\n .then(res => res.clone().json().then(data => {\n var cart = {\n total_price: data.total_price\/100,\n $value: data.total_price\/100,\n total_discount: data.total_discount,\n original_total_price: data.original_total_price\/100,\n items: data.items\n }\n if (item !== 'undefined') {\n cart = Object.assign(cart, item)\n }\n if (klAjax) {\n _learnq.push(['track', 'Added to Cart', cart]);\n klAjax = false;\n }\n }))\n};\n(function (ns, fetch) {\n ns.fetch = function() {\n const response = fetch.apply(this, arguments);\n response.then(res => {\n if (`${window.location.origin}\/cart\/add.js`\n \t.includes(res.url)) {\n \taddedToCart()\n }\n });\n return response\n }\n}(window, window.fetch));\nvar klAjax = true;\nvar atcButtons = document.querySelectorAll(\"form[action*='\/cart\/add'] button[type='submit']\");\nfor (var i = 0; i < atcButtons.length; i++) {\n atcButtons[i].addEventListener(\"click\", function() {\n if (klAjax) {\n _learnq.push(['track', 'Added to Cart', item]);\n klAjax = false;\n }\n })\n}\n});\n<\/script>"
"custom_liquid": "<script src=\"https:\/\/a.klaviyo.com\/media\/js\/onsite\/onsite.js\"><\/script>\n<script>\n var klaviyo = klaviyo || [];\n klaviyo.init({\n account: \"fBRWeY\",\n platform: \"shopify\"\n });\n klaviyo.enable(\"backinstock\",{ \n trigger: {\n product_page_text: \"Notify Me When Available\",\n product_page_class: \"btn\",\n product_page_text_align: \"center\",\n product_page_margin: \"0px\",\n replace_anchor: false\n },\n modal: {\n headline: \"{product_name}\",\n body_content: \"Register to receive a notification when this item comes back in stock.\",\n email_field_label: \"Email\",\n button_label: \"Notify me when available\",\n subscription_success_label: \"You're in! We'll let you know when it's back.\",\n footer_content: '',\n additional_styles: \"@import url('https:\/\/fonts.googleapis.com\/css?family=Helvetica+Neue');\",\n drop_background_color: \"#000\",\n background_color: \"#fff\",\n text_color: \"#222\",\n button_text_color: \"#fff\",\n button_background_color: \"#439fdb\",\n close_button_color: \"#ccc\",\n error_background_color: \"#fcd6d7\",\n error_text_color: \"#C72E2F\",\n success_background_color: \"#d3efcd\",\n success_text_color: \"#1B9500\"\n }\n });\n<\/script>\n<script>\nwindow.addEventListener('load', function() {\nvar _learnq = window._learnq || [];\nfunction addedToCart() {\n fetch(`${window.location.origin}\/cart.js`)\n .then(res => res.clone().json().then(data => {\n var cart = {\n total_price: data.total_price\/100,\n $value: data.total_price\/100,\n total_discount: data.total_discount,\n original_total_price: data.original_total_price\/100,\n items: data.items\n }\n if (item !== 'undefined') {\n cart = Object.assign(cart, item)\n }\n if (klAjax) {\n _learnq.push(['track', 'Added to Cart', cart]);\n klAjax = false;\n }\n }))\n};\n(function (ns, fetch) {\n ns.fetch = function() {\n const response = fetch.apply(this, arguments);\n response.then(res => {\n if (`${window.location.origin}\/cart\/add.js`\n \t.includes(res.url)) {\n \taddedToCart()\n }\n });\n return response\n }\n}(window, window.fetch));\nvar klAjax = true;\nvar atcButtons = document.querySelectorAll(\"form[action*='\/cart\/add'] button[type='submit']\");\nfor (var i = 0; i < atcButtons.length; i++) {\n atcButtons[i].addEventListener(\"click\", function() {\n if (klAjax) {\n _learnq.push(['track', 'Added to Cart', item]);\n klAjax = false;\n }\n })\n}\n});\n<\/script>"
}
}
},
Expand Down

0 comments on commit c2e18e2

Please sign in to comment.