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
{% 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-PRODUCT.LIQUID
Last updated: 2018-Oct-16
Sets all the appropriate liquid variables for Bold Apps that affect the product.
Creates an updated JSON object that takes all appropriate apps into account. Can mimic all three types of product objects that Shopify uses.
When installing, use {%- include 'bold-product', output: 'json' -%} to replace {{ product | json }} in the theme's liquid code.
Alternatively, use {%- include 'bold-product', output: 'json', escape: true -%} to replace {{ product | json | escape }} in the theme's liquid code.
FLAGS: