Skip to content

Instantly share code, notes, and snippets.

{%- comment -%}
BOLD-CSP-METAFIELD-VARIANT.LIQUID
Last updated: 2018-July-31
NOTE: Tag matching between customer tags and the shop metafield is case INSENSITIVE
FLAGS:
base_product: {product object} Base product object for the variant, used to check/set several properties. If not supplied, defaults to bold_product. If no bold_product is set, defaults to product
hide_action: 'skip' | 'none' (default) Forces a 'continue' to skip hidden variants when 'skip' is set
<!-- bold-cart-item.liquid -->
{% comment %} Last updated 2018-May-14 {% endcomment %}
{% capture bold_cart_item_liquid %}
{% comment %}
BOLD-CART-ITEM.LIQUID - Universal Bold Cart Updater
This file creates liquid variables to assist in updating line items in cart.liquid.
USED BY: Product Options, Recurring Orders, Product Builder
REQUIRES: bold.css
<!-- bold-cart.liquid -->
{% comment %} Last updated 2016-07-18 {% endcomment %}
{% capture bold_cart_liquid %}
{% comment %}
BOLD-CART.LIQUID - Universal Bold Cart Updater
This file creates liquid variables to assist in updating line items in cart.liquid.
USED BY: Product Options, Product Builder, Recurring Orders
REQUIRES: bold-cart-item.liquid, bold.css
<script>
(function(i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r;
i[r] = i[r] || function() {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date();
a = s.createElement(o),
m = s.getElementsByTagName(o)[0];
a.async = 1;
a.src = g;
<script>
$( document ).ready(function() {
var w = window.innerWidth;
if (w < 630) {
$( '.builder_verify_button .btn-success ' ).remove();
$( '.next-btn' ).after( '<div id="builder_verify_button" class="builder_verify_button" style="display:none"><button type="button" class="btn btn-success" onclick="popup_confirm()">Finish</button></div>' );
{% assign bold_product = bold-compare-specs %}
{% assign bold_metafield = bold_product.metafields.bold_spec %}
{% assign bold_meta_size = bold_metafield | size %}
{% if bold_meta_size > 0 %}
<div class="bold_specs" style="display:none;">
<table class="bold_spec_grid">
<thead>
<tr>
<th><script>document.write(BOLD.Compare.language.spec_title);</script></th>
{%- comment -%}
BOLD-COMMON.LIQUID
Last updated: 2018-Aug-9
--------------------------- WARNING ---------------------------
This file is auto-generated by BOLD and should not be modified.
It may be overwritten and any customizations would be lost.
--------------------------- WARNING ---------------------------
{%- endcomment -%}
<script>
/*!
* Generated with CSS Flag Sprite generator (https://www.flag-sprites.com/)
*/
.flag{
display:inline-block;
position: absolute;
top: 10px;
left: 6px;
width:16px;
height:11px;
<!-- Bold tips
You can cut and paste this complete basic template
or copy and paste the 2 Bold blocks before and after the "for line in line_item" loop,
adding these 3 items to your own template
{{ bold_options }}
{{ bold_item_price }}
{{ bold_line_price }}
where you want options, item price or line price to display
***************** -->
{%- comment -%}
BOLD-VARIANT.LIQUID
Last updated: 2018-December-7
Sets all appropriate liquid variables for Bold Apps that affect the variant.
Creates an updated JSON object that includes key information relating to our apps.
Combines the functionality of bold-hidden-variants, bold-base-variant and bold-variant-inventory
FLAGS:
base_product: {product object} Base product object for the variant, used to check/set several properties. If not supplied, defaults to bold_product. If no bold_product is set, defaults to product