Warning!
This article requires technical knowledge and prior experience with liquid code. If you are not comfortable with this, Request a Bold Motivator Installation for help.
Before you begin, review Notes Before Installing Apps. This article can help get you prepared and answers many common questions.
Note: This coding installation is only required if you're offering free gift items with Motivator Premium.
Select each step below to view the instructions.
- Duplicate themes, to create a backup copy.
- From Shopify's admin, select Online Store.
- Select Actions.
- Select Edit code.
- Under "Snippets", find these three files:
- bold-product.liquid
- bold-variant.liquid
- bold-cart-item.liquid
- For any that don't exist:
- Select Add a new snippet.
- Enter the correct Snippet name.
- Select Create snippet.
- Copy and paste the code found in each of these links into their respective files:
- Select Save.
- Repeat steps 6a – d for each missing snippet file.
- Select Add a new snippet.
- From Shopify's admin, select Online Store.
- Select Actions.
- Select Edit code.
- Under "Layout", select theme.liquid.
- Copy and paste this code directly above the </head> tag:
{% if product.metafields.inventory.ShappifyHidden == "true" %} <meta name="robots" content="noindex"> {% endif %}
- Select Save.
- From Shopify's admin, select Online Store.
- Select Actions.
-
Select Edit code.
- Under "Templates", select collection.liquid.
Note: If your template contains sections, you will need to select the collection-template.liquid section instead.
-
Find:
{% for product in collection.products %}
Note: This line may appear more than once in the file, you will need to add the line of code for each instance. Can't find this code?
-
Copy and paste this code directly below each instance:
{% include 'bold-product' with product, hide_action: 'skip' %}
- Select Save.
- From Shopify's admin, select Online Store.
- Select Actions.
- Select Edit code.
- Under "Templates", select index.liquid.
-
Find:
{% for product in collection.products %}
Note: This line may appear more than once in the file, you will need to add the line of code for each instance. Can't find this code?
-
Copy and paste this code directly below each instance:
{% include 'bold-product' with product, hide_action: 'skip' %}
- Select Save.
- From Shopify's admin, select Online Store.
- Select Actions.
- Select Edit code.
- Under "Snippets", select related-product.liquid.
Note: If the theme does not have the file related-product.liquid, proceed to the next step.
-
Find:
{% for product in collection.products %}
Note: This line may appear more than once in the file, you will need to add the line of code for each instance. Can't find this code?
-
Copy and paste this code directly below each instance:
{% include 'bold-product' with product, hide_action: 'skip' %}
- Select Save.
- From Shopify's admin, select Online Store.
- Select Actions.
- Select Edit code.
- Under "Templates", select search.liquid.
Note: You may find this code in a similarly titled file instead.
-
Find:
{% for item in search.results %}
Note: This line may appear more than once in the file, you will need to add the line of code for each instance.
-
Copy and paste this code directly below each instance:
{% include 'bold-product' with item, hide_action: 'skip' %}
- Select Save.
- From Shopify's admin, select Online Store.
- Select Actions.
- Select Edit code.
- Under "Templates", select product.liquid.
Note: If your template contains sections, you will need to select the product-template.liquid section instead.
- Paste this code at the top of the file:
{% include 'bold-product' with product, hide_action: 'break' %}{% if bold_hidden_product %}{% break %}{%endif %}
- Select Save.
- From Shopify's admin, select Online Store.
- Select Actions.
- Select Edit code.
- Under "Templates", select cart.liquid.
Note: If your theme contains sections, you may have to look for this code under "Sections" in cart-template.liquid instead.
-
Find:
{% for item in cart.items %}
and add this code directly after:
{% include 'bold-cart-item' with item %}
Note: This may appear more than once in the file, repeat this step for each instance.
- Find a line that starts with <input,ends with /> and contains value="{{ item.quantity }}". Can't find this code?
-
Copy and paste:
{{ bold_qty_attr }}
right before the />.
It will look similar to this:
<input value="{{ item.quantity }}" {{ bold_qty_attr }} />
- Select Save.
That's it!
Next Steps:
- Change How the Message Appears
- Create a Bold Motivator Goal
- Add a Checkmark to the Message when the Goal is Reached
Comments
Please sign in to leave a comment.