Bold Motivator Premium Code Install Instructions

Bold Motivator only requires a liquid code installation if you are planning on offering free gifts to your customers while on the Premium Plan.

We offer a few different options to help you complete this installation on your store:

  1. The ability to request a professional installation from our team
  2. A step-by-step guide on completing this manually

Before you start we highly recommend creating a Duplicate version of your Shopify theme to ensure you have a copy without our code installation.

 


 

Request a Motivator Install

  1. From within the Motivator admin, select Need Help?

    Select Need Help?

  2. Select Liquid Installation.

    Select Liquid Installation

  3. Select Request Motivator Premium Liquid Install.

    Select Request Install

  4. Select the theme you would like us to install the Liquid code onto.

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

    Select your theme

  5. Select Looks Good! Send Away!

 


 

Manual Install

Step 1: Edit theme.liquid

  1. Under Layout, select theme.liquid.

    Select theme.liquid

  2. Copy and paste this code directly above the </head> tag:
    {% if product.metafields.inventory.ShappifyHidden == "true" %} <meta name="robots" content="noindex"> {% endif %}

    copy and paste this code

  3. Select Save.

 


 

Step 2: Edit collection.liquid

  1. Under Templates, select collection.liquid.

    Note: If your theme contains sections, you will instead need to select the collection-template.liquid section instead.

    Select collection.liquid

  2. Find the following code:

    {% for product in collection.products %}

    Note: This line may appear more than once in the theme file. You will need to add the line of code for each instance. Can't find this code? Click here for additional help.

    Find for product loop

  3. Copy and paste this code directly below each instance:

    {% if product.metafields.inventory.ShappifyHidden %}{% continue %}{% endif %}

     

  4. Select Save.

 


 

Step 3: Edit index.liquid

  1. Under Templates, select index.liquid.

    Select index.liquid

  2. Find the following code:

    {% for product in collection.products %}

    Note: This line may appear more than once in the theme file. You will need to add the line of code for each instance. Can't find this code? Click here for additional help.

    Find index code

  3. Copy and paste this code directly below each instance:

    {% if product.metafields.inventory.ShappifyHidden %}{% continue %}{% endif %}

    Paste index code

  4. Select Save.

     

 


 

Step 4: Edit related-products.liquid

  1. Under Snippets, select related-product.liquid.

    Note: If the theme does not have the file related-product.liquid, proceed to the next step.

    Select related-products.liquid

  2. Find the following code:

    {% for product in collection.products %}

    Note: This line may appear more than once in the theme file. You will need to add the line of code for each instance. Can't find this code? Click here for additional help.

    Find related products code

  3. Copy and paste this code directly below each instance:

    {% if product.metafields.inventory.ShappifyHidden %}{% continue %}{% endif %}

    Paste related products code

  4. Select Save.

 


 

Step 5: Edit search.liquid

  1. Under Templates, select search.liquid.

    Note: If you are not able to find this within the search.liquid file, you may find this code in a similarly titled file instead.

    Select search.liquid

  2. Find the following code:

    {% for item in search.results %}

    Note: This line may appear more than once in the theme file. You will need to add the line of code for each instance.

    Find search code

  3. Copy and paste this code directly below each instance:

    {% if item.metafields.inventory.ShappifyHidden %}{% continue %}{% endif %}

    Paste search code

  4. Select Save.

 


 

Step 6: Edit product.liquid

  1. Under Templates, select product.liquid.

    Note: If your theme contains sections, you will need to select the product-template.liquid section instead.

    Select product.liquid

  2. Paste this code at the top of the file:
    {% if product.metafields.inventory.ShappifyHidden %}{% break %}{% endif %}

    Paste product code

  3. Select Save.

 


 

Step 7: Edit cart.liquid

  1. Under Templates, select cart.liquid.

    Note: If your theme contains sections, you will instead have to look for this code within the cart-template.liquid under Sections.

    Select cart.liquid

  2. Find a line that starts with <input, ends with />, and contains value="{{ item.quantity }}". Can't find this code? Click here for additional help.

    Find the code

  3. Copy and paste:

    {% if item.product.metafields.inventory.ShappifyHidden == 'true'%} readonly {% endif %}

    right before the />.

    It will look similar to this:

    <input value="{{ item.quantity }}" {% if item.product.metafields.inventory.ShappifyHidden == 'true'%} readonly {% endif %} />

    Paste cart code

  4. Select Save.

     

 


 

Code Removal

If you would like to remove the liquid code from your theme, the liquid code can be removed by deleting the snippet files, asset files, and the code includes mentioned in the instruction steps above.

You can otherwise request a code removal by contacting our Merchant Success team.

And you can remove the app from your by following this guide: Uninstall an App from Your Store

 

 Pro-Tip

If you are experiencing issues with performance on the storefront with Bold Motivator after completing the steps above, we recommend requesting an expert installation, as your theme may require further liquid code changes. See previous step Request a Motivator Install for more information.

Was this article helpful?
7 out of 12 found this helpful