Skip to content

Instantly share code, notes, and snippets.

//
// Polyfill Promise for IE
//
window.Promise || (function() {
var scr = document.createElement('script')
scr.src = 'https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.auto.min.js'
document.head.appendChild(scr)
})()
//
// End Polyfill
<style>
/* RESET CSS */
html, body, div, span, h1, h2, h3, h4, h5, h6, p, a, em, img, strong, sub,
sup, b, u, i, center, ol, ul, li, label, aside, footer, header, section {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
<style>
/* RESET CSS */
html, body, div, span, h1, h2, h3, h4, h5, h6, p, a, em, img, strong, sub,
sup, b, u, i, center, ol, ul, li, label, aside, footer, header, section {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
@boldsupport
boldsupport / bold-bundles.css
Last active August 5, 2022 18:35
bold-bundles.css
/*
------------------------------------ WARNING ------------------------------------
This file will be overwritten and should not be edited directly.
In order to edit custom CSS for Bold Product Bundles you should:
- Log into your Shopify Admin Panel
- Go to Apps --> Installed --> Product Bundles
- Go to Display Settings
------------------------------------ WARNING ------------------------------------
bold-bundles.css version 1
Generated at 2019-12-04 11:48:15
@boldsupport
boldsupport / load-subscriptions-script.js
Created October 11, 2019 19:33
load-subscriptions-script.js
<script type="text/javascript">
(function accountInstall() {
var scriptSelectors = [
'.cashier_loader_script',
'#bold-subscriptions-custom-script',
'#bold-subscriptions-script',
'#bold-subscriptions-platform-script',
];
if (document.querySelector(scriptSelectors[0]) && document.querySelector(scriptSelectors[2])) {
@boldsupport
boldsupport / UbE-neutral-page.css
Created February 12, 2019 14:59
A neutral CSS template to use on landing pages for Upsell by Email
html {
font-family: "Helvetica Neue", Arial, sans-serif;
}
.flex-spacer {
flex: 1;
}
.content {
min-width: 700px;
@boldsupport
boldsupport / bold-custom-upsell-template.liquid
Created December 3, 2018 17:50
This snippet allows customization of the Upsell modal that appears on the storefront.
<script>
window.BOLD.upsell = window.BOLD.upsell || {};
window.BOLD.upsell.templates = window.BOLD.upsell.templates || {};
{% comment %}
Note: Uncomment to customize the "upsellSingleProduct" template
{% raw %}
window.BOLD.upsell.templates['upsellSingleProduct'] = `<article id="prod_id_{{product.id}}_{{key}}" class="bold-product bold-grid offer_id_{{product.upsell_offer_settings.offer_id}}">
<div class="bold-product__image-container bold-grid__column bold-grid__column--half">
@boldsupport
boldsupport / cashier_klaviyo_order_complete.html
Last active September 28, 2022 20:03
Cashier Order Completed Script for Klaviyo Integration
<script async type="text/javascript" src="//static.klaviyo.com/onsite/js/klaviyo.js?company_id=*YOUR COMPANY ID*"></script>
<script>
var intervalCount = 0;
const ORDER_COMPLETED_EVENT = 'Order Completed';
var intervalId = setInterval(() => {
if (typeof window._learnq !== 'undefined') {
clearInterval(intervalId);
@boldsupport
boldsupport / cashier_startup.html
Last active September 28, 2022 20:06
Cashier Startup Script for Klaviyo Integration
<script async type="text/javascript" src="//static.klaviyo.com/onsite/js/klaviyo.js?company_id=*YOUR COMPANY ID*"></script>
<script>
var intervalCount = 0;
const STARTED_CHECKOUT_EVENT = 'Started Checkout';
var intervalId = setInterval(() => {
if (typeof window._learnq !== 'undefined') {
clearInterval(intervalId);
{% comment %}This snippet is generated and updated by Bold Memberships.{% endcomment %}
{% assign bold_hide_item = false %}
{% assign bold_item_type = 'index'%}
{% for bold_rule in index.metafields.bold_mem %}
{% if bold_rule.last== 'hide' %}
{% assign bold_hide_item = false %}
{% endif %}
{% if bold_rule.last == 'show' %}
{% assign bold_hide_item = true %}
{% assign bold_noaccess_snippet = 'bold-memberships-noaccess-' | append: bold_rule.first %}