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:
- From the Bold Memberships admin, select More.
- Select Liquid Instructions.
- Under Option 2, select Yes please. Install it for me!
- 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.
- 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.
- Duplicate your theme to create a backup copy.
- From Shopify's admin, select Online Store.
- Select Actions.
- Select Edit code.
- 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
- If some of the files are missing:
- Select Add a new snippet.
- Enter the correct snippet name (listed below).
- Select Create snippet.
- Copy and paste the code found in each of these links into their respective 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
- Select Save.
Continuing within the theme files, complete the following steps:
- Under "Layout", select theme.liquid.
- 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 -->
- Select Save.
Continuing within the theme files, complete the following steps:
- Under "Templates", select article.liquid.
- 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 -->
- Select Save.
Continuing within the theme files, complete the following steps:
- Under "Templates", select blog.liquid.
- 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 -->
- Select Save.
Continuing within the theme files, complete the following steps:
- Under "Templates", select page.liquid.
- 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 -->
- Select Save.
Continuing within the theme files, complete the following steps:
- Under "Templates", select search.liquid.
-
Look for:
{% for item in search.results %}
or:
{% for product in search.results %}
- Copy and paste this code below the line:
<!-- Bold: Memberships (search) --> {% include 'bold_mem_helper' with 'search' %} <!-- end Bold code -->
- Select Save.
Continuing within the theme files, complete the following steps:
- Under "Templates", select customers/account.liquid.
- Copy and paste this code at the beginning of the file:
<!-- Bold: Memberships (accounts) --> {% include 'bold-memberships-salt' %} <!-- end Bold code -->
-
Look for code similar to this:
<h1 class="title clearfix">
- 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 -->
- Select Save.
Continuing within the theme files, complete the following steps:
- Under "Templates", select collection.liquid.
- 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 -->
-
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?
- 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 -->
-
Look for code referencing a price like:
{{ product.price | money }}
Note: This code may be found in other liquid files as well.
- 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 -->
- Select Save.
Continuing within the theme files, complete the following steps:
- Under "Templates", select product.liquid.
- 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 -->
- 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.
- 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 -->
-
Look for code referencing a price like:
{{ product.price | money }}
Note: This code may be found in other liquid files as well.
- 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 -->
- Select Save.
Continuing within the theme files, complete the following steps:
- Under "Templates" select index.liquid.
- Copy and paste this code at the beginning of the file.
<!-- Bold: Memberships (index) -->
{% include 'bold_mem_helper' with 'index' %}
<!-- end Bold code --> - Select Save.