Bold Memberships Code Install Instructions

 Caution

This article only applies to the liquid installation for Bold Memberships. If you decide to complete the installation yourself, it requires technical knowledge and prior experience with Liquid code. If you are not comfortable with this, please request an installation using the instructions below. Otherwise, continue to the installation steps.

Request an Installation

To request an installation from our team, please follow these steps:

  1. From the Bold Memberships admin, select More.
  2. Select Liquid Instructions.
  3. Under Option 2, select Yes please. Install it for me!
  4. Select the theme you would like us to install the app's coding on.

    Note: You can specify any additional instructions for our installs team in the text field below.

  5. Select Looks Good! Send Away!

    Note: This will create a ticket request with our installation team. All of these requests are completed manually on a rotational basis and will be completed as soon as possible. You will be asked to confirm which theme you would like this coding to be installed on after selecting this option.

 


 

Complete the Installation Manually

Note: This coding installation is required if you want to show or hide certain pages from your customers, based on their membership.

 Caution

If you would like to remove the liquid code from your theme, the liquid code can be removed by deleting the snippet files and code includes mentioned in the instruction steps below. You can also request an uninstall request by contacting our Merchant Success team.

Note: If you are experiencing issues with performance on the storefront with Bold Memberships after completing the steps below, we recommend requesting an expert installation, as your theme may require further liquid code changes.

Select each step below to view the instructions.

  1. Duplicate your theme to create a backup copy.
  2. From Shopify's admin, select Online Store.
  3. Select Actions.
  4. Select Edit code.
  5. Under "Snippets", find the following files: 
    • bold-memberships-addtocart.liquid
    • bold-memberships-article.liquid
    • bold-memberships-blog.liquid
    • bold-memberships-collection.liquid
    • bold-memberships-page.liquid
    • bold-memberships-price.liquid
    • bold-memberships-product.liquid
    • bold_mem_helper.liquid
    • bold-memberships-template.liquid
    • bold-memberships-index.liquid
  6. If some of the files are missing:
    1. Select Add a new snippet.
    2. Enter the correct snippet name (listed below).
    3. Select Create snippet.
    4. Copy and paste the code found in each of these links into their respective files:
    5. Select Save.

Continuing within the theme files, complete the following steps:

  1. Under "Layout", select theme.liquid.
  2. Copy and paste this code on the line after the <body> tag:
    <!-- Bold: Memberships -->
    {% if customer %}
    <div class="bold_customer_id" hidden>{{ customer.id }}</div>
    {% endif %}
    <!-- end Bold code -->

    copy and paste this code

  3. Select Save.

Continuing within the theme files, complete the following steps:

  1. Under "Templates", select article.liquid.
  2. Copy and paste this code at the beginning of the file:

    Note: If you intend to use the alternate template feature within the Memberships app, each template must have this include at the top.

    <!-- Bold: Memberships (Article) -->
    {% include 'bold_mem_helper' with 'article' %}
    <!-- end Bold code -->

    copy and paste this code

  3. Select Save.

Continuing within the theme files, complete the following steps:

  1. Under "Templates", select blog.liquid.
  2. Copy and paste this code at the beginning of the file:

    Note: If you intend to use the alternate template feature within the Memberships app, each template must have this include at the top.

    <!-- Bold: Memberships (blog) -->
    {% include 'bold_mem_helper' with 'blog' %}
    <!-- end Bold code -->

    copy and paste this code

  3. Select Save.

Continuing within the theme files, complete the following steps:

  1. Under "Templates", select page.liquid.
  2. Copy and paste this code just before the {{ page.content }} section:

    Note: If you intend to use the alternate template feature within the Memberships app, each template must have this include at the top.

    <!-- Bold: Memberships (page) -->
    {% include 'bold_mem_helper' with 'page' %}
    <!-- end Bold code -->

    page.liquid_mem_helper_insert.png

  3. Select Save.

Continuing within the theme files, complete the following steps:

  1. Under "Templates", select search.liquid.
  2. Look for:

    {% for item in search.results %}

    or:

    {% for product in search.results %}

    look for this code

  3. Copy and paste this code below the line:
    <!-- Bold: Memberships (search) -->
    {% include 'bold_mem_helper' with 'search' %}
    <!-- end Bold code -->

    copy and paste this code

  4. Select Save.

Continuing within the theme files, complete the following steps:

  1. Under "Templates", select customers/account.liquid.
  2. Copy and paste this code at the beginning of the file:
    <!-- Bold: Memberships (accounts) -->
    {% include 'bold-memberships-salt' %}
    <!-- end Bold code -->

    copy and paste this code

  3. Look for code similar to this:

    <h1 class="title clearfix">

    look for this line

  4. Copy and paste this code below the line:
    <!-- Bold: Memberships (manage memberships) -->
    <span class="note"><a href="/apps/memberships/accountDetails/?id={{customer.id}}&h={{bold_memberships_hash}}">Manage Memberships</a></span>
    <!-- end Bold code -->

    copy and paste this code

  5. Select Save.

Continuing within the theme files, complete the following steps:

  1. Under "Templates", select collection.liquid.
  2. Copy and paste this code at the beginning of the file:

    Note: If you intend to use the alternate template feature within the Memberships app, each template must have this include at the top. If you are using sections, you may need to do these steps in collection-template.liquid under "Sections" instead.

    <!-- Bold: Memberships (collection) -->
    {% include 'bold_mem_helper' with 'collection' %}
    <!-- end Bold code -->

    copy and paste this code

  3. Look for:

    {% for product in collection.products %}

    Note: This code may be found within "Sections", collection-template.liquid or "Snippets, product-loop.liquid. Can't find this code?

    look for this line

  4. Copy and paste this code below the line:
    <!-- Bold: Memberships (collection products) -->
    {% include 'bold-memberships-product' %}
    {% if bold_hide_item == true %}
    {% continue %}{% endif %}
    <!-- end Bold code -->

    copy and paste this code

  5. Look for code referencing a price like:

    {{ product.price | money }}

    Note: This code may be found in other liquid files as well.

    look for this code

  6. Wrap this code around each price code:
    <!-- Bold: Memberships (collection price) -->
    {% include 'bold-memberships-price' %}
    {% if bold_hide_item == false %}
    
    <!-- price code stuff -->
    
    {% endif %}
    <!-- end Bold code -->

    paste this code

  7. Select Save.

Continuing within the theme files, complete the following steps:

  1. Under "Templates", select product.liquid.
  2. Copy and paste this code at the beginning of the file:

    Note: If you intend to use the alternate template feature within the Memberships app, each template must have this include at the top. If your theme contains sections, make these changes within product-template.liquid under "Sections".

    <!-- Bold: Memberships (product) -->
    {% include 'bold_mem_helper' with 'product' %}
    <!-- end Bold code -->

    copy and past this code

  3. Find the add to cart button.

    Note: Some themes may have an add to cart button outside the product page, such as a quick view window. Add this code there as well.

    find the add to cart button

  4. Wrap the button with this code:
    <!-- Bold: Memberships (cadd to cart) -->
    {% include 'bold-memberships-addtocart' %}
    {% if bold_hide_item == false %}
    
    <!-- Addtocartbutton here -->
    
    {% endif %}
    <!-- end Bold code -->

    paste this code

  5. Look for code referencing a price like:

    {{ product.price | money }}

    Note: This code may be found in other liquid files as well.

    look for this code

  6. Wrap each price code with this code:
    <!-- Bold: Memberships (product price) -->
    {% include 'bold-memberships-price' %}
    {% if bold_hide_item == false %}
    
    <!-- price code stuff -->
    
    {% endif %}
    <!-- end Bold code -->

    paste this code

  7. Select Save.

Continuing within the theme files, complete the following steps:

  1. Under "Templates" select index.liquid.
  2. Copy and paste this code at the beginning of the file.
    <!-- Bold: Memberships (index) -->
    {% include 'bold_mem_helper' with 'index' %}
    <!-- end Bold code -->

    Pasted Code

  3. Select Save.
Was this article helpful?
12 out of 16 found this helpful