Product Options 1.0 requires our Liquid code installation to function correctly on your store.
Before you start, we highly recommend creating a Duplicate version of your Shopify theme to ensure you have a copy without our code installation.
Alert
These instructions are for Version 1 of Product Options. If you aren't sure which version you have, please contact our Merchant Success team.
Manual Install
Step 1: Add Snippet Files
- From the Shopify admin, select Online Store.
- Select Actions.
- Duplicate the theme you would like the installation completed on.
- Select Edit Code on the duplicated theme.
- Under Snippets, find these five files:
- shappify-options.liquid - This one should already be there.
- bold-cart.liquid
- bold-cart-item.liquid
- bold-product.liquid
- bold-variant.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 5a – d for each missing snippet file.
- Select Add a new snippet.
- Under Assets, select bold.css. If it doesn't exist:
- Select Add a new asset.
- Select Create a blank file.
- Enter the correct asset name.
- Select .css from the dropdown.
- Select Add asset.
- Copy and paste the code found here: bold.css
- Select Save.
- Select Add a new asset.
Step 2: Edit theme.liquid
- From the Shopify admin, select Online Store.
- Select Actions.
- Select Edit code.
- Under Layout, select theme.liquid.
-
Copy and paste this code directly above the </head> tag:
{{ 'bold.css' | asset_url | stylesheet_tag }} {% include 'bold-product' with product, hide_action: 'header' %}
- Select Save.
Step 3: Duplicate & Hide Code Install
- From the Shopify admin, select Online Store.
- Select Actions.
- Select Edit code.
-
Under Templates, select collection.liquid.
Note: If your theme contains sections you may need to make these changes in collection-template.liquid under Sections instead.
-
Search for the line:
{% for product in collection.products %}
-
Copy and paste this code directly after that line:
{% include 'bold-product' with product, hide_action: 'skip' %}
- Select Save.
- Under Templates, select search.liquid.
-
Search for the line:
{% for item in search.results %}
-
Copy and paste this code directly after that line:
{% include 'bold-product' with item, hide_action: 'skip' %}
Note: If this code appears more than once, repeat this step for each instance.
- Select Save.
- Under Templates, select product.liquid.
-
Copy and paste this code on the first line:
{% include 'bold-product' with product, hide_action: 'break' %}{% if bold_hidden_product %}{% break %}{%endif %}
- Select Save.
Step 4: Edit product.liquid
- From the Shopify admin, select Online Store.
- Select Actions.
- Select Edit code.
- Under Templates, select product.liquid.
-
Search for the line that begins with:
<form action="/cart/add" method="post"
- Copy and paste this code:
- Add shappify_add_to_cart_form within the quotes in the class tag.
- Add data-product-id="{{ product.id }}" anywhere within the form tag.
- Add enctype="multipart/form-data" within the form tag.
When you are done, the form line should look like this:
Note: Some themes will have the product form changed within a snippet file, commonly named product-form.liquid, short-form.liquid, or similar. If that is the case, you will need to make the changes to that file instead.
- Add shappify_add_to_cart_form within the quotes in the class tag.
- Within the <form></form> tags, add this code:
{% include 'shappify-options' %}
Note: This code will display the option selections on the product page. For many themes, this code is best positioned below the theme code that displays Shopify's product variants.
- Select Save.
Step 5: Edit cart.liquid
- From the Shopify admin, select Online Store.
- Select Actions.
- Select Edit code.
-
Under Templates, select cart.liquid.
Note: If your theme uses sections, you may have to select cart-template.liquid under Sections instead.
-
On the first line add:
{% include 'bold-cart' %}
-
Find:
{% for item in cart.items %}
and add this code directly after:
{% include 'bold-cart-item' with item %}
-
On the last line add:
{{ bold_edit_in_cart }}
-
Find:
{% for item in cart.items %}
and look for the first <tr>, <ul>, <div> or <li> after it.
-
Within the class attribute in the container tag, add:
{{ bold_row_class}}
Note: If there is no class, add it.
-
Add:
{{ bold_row_data }}
anywhere else inside the container tag outside any other attribute.
-
Add:
{{ bold_item_properties }}
immediately after the line containing:
item.product.title
Note: This can be added anywhere you would like the list of selected options to appear.
-
If there is any code that looks like this, remove it or comment it out.
Note: To comment out code enter <!-- before the code and --> after it.
-
Find the line beginning with either:
<input type="number"
or:
<input type="text"
-
Add:
{{ bold_qty_class }}
to the class of the quantity box.
Note: If there is no class, add it.
-
Add:
{{ bold_qty_attr }}
anywhere else inside the input tag.
-
-
Find the remove code. It will vary by theme but it should contain the word remove and look similar to this:
<a href="/cart/change?line={{ forloop.index }}&quantity=0"
-
Replace the code within the quotations in the href attribute with:
{{ bold_remove_href }}
-
Add:
{{ bold_remove_class }}
to the class of the remove button.
Note: If there is no class, add it.
-
Add:
{{ bold_remove_attr }}
anywhere else inside the tag.
Note: If there is an onclick within the remove line, delete it.
-
-
Replace any instances of:
item.price
with:
bold_item_price
-
Replace any instances of:
item.line_price
with:
bold_item_line_price
Note: Depending on how the theme was created, it may only have either item.price or item.line_price. Do not worry if your theme doesn't have both.
- Select Save.
Step 6: Edit customers/order.liquid
- From the Shopify's, select Online Store.
- Select Actions.
- Select Edit code.
- Under Templates, select customer/order.liquid.
-
Under the line:
{% for line_item in order.line_items %}
Add this code:
{% include 'bold-cart-item' with line_item, bold_order:order %}
-
Find:
{% for line_item in order.line_items %}
and look for the first <tr>, <ul>, <div> or <li> after it.
-
Within the class attribute in the container tag, add:
{{ bold_row_class}}
Note: If there is no class, add it.
-
Add:
{{ bold_item_properties }}
immediately after the line containing:
line_item.title
Note: This can be added anywhere you would like the list of selected options to appear.
-
Replace any instances of:
line_item.price
with:
bold_item_price
-
Replace any instances of
line_item.line_price
with:
bold_item_line_price
Note: Depending on how the theme was created, it may only have either item.price or item.line_price. Do not worry if your theme doesn't have both.
- Select Save.
Step 7: Edit Email Notifications
- From the Shopify Admin, select Settings.
- Select Notifications.
- Select Order confirmation.
- Copy the order confirmation code and overwrite the existing code.
- Select Save.
- Select Notifications.
- Select Shipping confirmation.
- Copy the shipping confirmation code and overwrite the existing code.
- Select Save.
- Select Notifications.
- Select Shipping update.
- Copy the shipping update code and overwrite the existing code.
- Select Save.
- Select Notifications.
- Select New order.
- Copy the new order code and overwrite the existing code.
- 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 store by following this guide: Uninstall an App from Your Store