Bold Subscriptions for Shopify Checkout requires Liquid code in order to run correctly on your store. This ensures the subscription options appear on your product pages.
We offer a few different options to help you complete this installation on your store:
- An automatic installation
- An expert install performed by our team
- A step-by-step guide to install the code manually
Before installing the Liquid code, it is recommended to create a duplicate version of your Shopify theme to ensure you have a copy without our code installation.
This article is relevant to Subscriptions for Shopify Checkout. If you have Bold Subscriptions V1 installed on your store, please visit Installation Guide for Bold subscriptions V1. If you are unsure which version of Bold Subscriptions that you have currently installed, please visit Identify Your Version of Bold Subscriptions.
Automatic Install
If you don't feel comfortable with Liquid code, we have an automatic installer that will help by placing this code directly into your Shopify theme with the click of a button.
To request an installation, please follow these steps:
- From the Shopify admin, select Apps.
- Select Bold Subscriptions.
- Within the apps menu, select Help.
- Select Theme code update.
- Select your preferred theme.
- Select I have created a backup of this theme.
Note: Creating a backup of your theme is the same as creating a duplicate. Please visit Duplicate version of your Shopify theme for more information.
- Select Start automatic install.
Completing these steps will trigger our automatic installer to run on your store.
If your current theme is not compatible with our automatic installation tool, the app will automatically notify you. If this happens, you can rollback your theme to its previous state.
When the installation has not been completed in full, reverting the changes will automatically create an installation request for our team to assist you further.
Request a Subscriptions Install
Alert
To maintain the security of your Shopify account, we ask that you do not proactively send us a staff account invite for access to your shop. Instead, our team will request collaborator access to your shop.
This option creates a ticket request with our installation team, and schedules your store for a manual installation completed by our experts. By selecting this option, you will be asked to confirm which theme you would like this code installation to be completed on.
All of these requests are completed manually on a rotational basis and will be completed as soon as possible.
- From within Bold Subscriptions, navigate to Help > Theme code update.
- Select the text which says Expert theme update service.
- On the bottom left corner, select the theme where you would like the installation completed.
- Select Submit Request.
Manual Install (Vintage Themes)
This step will instruct you on how to complete the Liquid code installation yourself. This method of installation is only suggested if you have a strong knowledge of Liquid coding.
Before you start the installation, please create a duplicate of your theme. This allows you to test your installation before making the theme live on your store.
It is recommended to complete an automatic installation first. The manual installation steps below can then be followed to ensure that everything is added correctly and displaying properly on your store.
Step 1: Add the liquid files
Alert
If you have previously installed Subscriptions for Shopify Checkout on your store prior to March 2023, then you will have the bsub.scss file on your store, instead of the bsub.css file as shown in step 7 below. If you need to reinstall Bold Subscriptions, please use the new bsub.css file as shown below. Please note, any customizations you have made to the previous bsub.scss file will need to be recreated in the new file.
- From the Shopify admin, navigate to Sales channels > Online Store.
- Duplicate the theme you would like the installation completed on.
- Select Edit code on the duplicated theme.
- Under Snippets, find the following files:
bsub-widget.liquid
bsub-cart.liquid - If the snippet files do not currently exist, select Add a new snippet. If these files do exist, please skip to Step #7.
- Enter the correct snippet name.
- Select Create snippet.
- Copy and paste the code from the following links:
- Select Done.
- Under Assets, find the following files:
bsub.js
bsub.css - If the Asset files do not currently exist, select Add a new asset. If they do exist, please skip to Step 2: Edit product.liquid.
Step 2: Edit product.liquid
- Under Templates, select product.liquid. This code may be under product-template.liquid (IE. the product.liquid contains {% section ‘product-template’ %}) depending on your theme.
-
Add this code where you want the widget to display. This normally is placed above the Add to Cart button, or the Quantity Selector:
{% render 'bsub-widget' %}
Note: The widget must be included within a <form> or { % form %}, otherwise the widget will not appear.
- Select Save.
If you would like to move the subscription widget up or down the product page, you can do so by moving the line of code mentioned above either up or down the liquid file between the <form> or { % form %} start and end lines.
Step 3: Edit cart.liquid
- Under Templates, select cart.liquid. It may redirect you to cart-template.liquid depending on your theme.
-
Find the beginning of the cart properties loop in the file:
-
Add the following code within the cart loop:
{% render 'bsub-cart' %}
- Select Save.
Step 4: Edit theme.liquid
- Under Layout, select theme.liquid.
-
Find the end of the head tag. This should look like </head> in the file:
-
Add the following code above the closing </head> tag:
{{ 'bsub.js' | asset_url | script_tag }}
{{ 'bsub.css' | asset_url | stylesheet_tag }} - Select Save.
Step 5: Edit customers/account.liquid
This step explains how to add the My Subscriptions page link in to the customer’s account details page. Without this link being inserted into an obvious area, subscribers may find it difficult to locate where to manage their subscription.
We recommend inserting this link into the recommended location, though other locations can be utilized as well - like in your main navigation bar. This link can be moved around to your liking.
- Under Templates, select customers/account.liquid.
-
Under the line:
{{ 'customer.account.details' | t }}
or:
{{ 'customer.account.title' | t }}
copy and paste the following code:
<p><a href="/pages/my-subscriptions" class="text-link">My Subscriptions</a></p>
If you are not seeing either of the codes above, you can add this under the </header>.
- Select Save.
Step 6: Add the Customer Portal page
- From the Shopify admin, navigate to Sales channels > Online Store > Pages.
-
Select Add page.
-
Add My Subscriptions to the title of the page.
- Select the Show HTML button:
- Add the following line of code to the HTML input box:
<div id="customer-portal-root"></div>
- Select Save.
Manual Install via App Widget Block (Online Store 2.0 Themes)
Step 1: Install the app widget block
- From the Shopify admin, navigate to Sales channels > Online Store.
- Select Customize.
- Select Products, then select the template you want to edit.
Note: Subscription products must be added to a subscription group in order to display a preview of the widget.
- Select Product information, then Add block.
- Select BSUB Widget.
Step 2: Edit customers/account.liquid
This step explains how to add the My Subscriptions page link in to the customer’s account details page. Without this link being inserted into an obvious area, subscribers may find it difficult to locate where to manage their subscription.
We recommend inserting this link into the recommended location, though other locations can be utilized as well - like in your main navigation bar. This link can be moved around to your liking.
- From the Shopify admin, navigate to Sales channels > Online Store.
- Duplicate the theme you would like the installation completed on.
- Select Edit code on the duplicated theme.
- Under Templates, select customers/account.liquid.
-
Under the line:
{{ 'customer.account.details' | t }}
or:
{{ 'customer.account.title' | t }}
copy and paste the following code:
<p><a href="/pages/my-subscriptions" class="text-link">My Subscriptions</a></p>
If you are not seeing either of the codes above, you can add this under the </header>.
- Select Save.
Step 3: Add the Customer Portal page
- From the Shopify admin, navigate to Sales channels > Online Store > Pages.
-
Select Add page.
-
Add My Subscriptions to the title of the page.
- Select the Show HTML button:
- Add the following line of code to the HTML input box:
<div id="customer-portal-root"></div>
- Select Save.
Pro-Tip
If you are unsure of whether you are using a Vintage or Online Store 2.0 theme, please visit Shopify’s article Theme architecture versions.
Verify the Bold Subscriptions Installation
Before continuing, please ensure that you have completed one of the installation methods above. Please know that a subscription group will have to be created on your store to test this further.
- Within the Shopify admin, select Products and then select a product that is already included within a subscription group. You should see a section within the item page that has selling plans, and Bold Subscriptions will be listed within the frequency options.
- Navigate to your storefront and find a subscription product. The widget should appear on your product page.
- Test adding the product to your cart. The order frequency should appear within the cart page.
- Take the product to the checkout and purchase the subscription. You can then review the Bold Subscriptions app customers to see if that order is now listed.
- On your storefront, log in to a customer account for subscriptions. On the account page, you should see a My Subscriptions link.
Code Removal
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 Customer Success team.
You can remove the app from your Shopify admin by following this guide: Uninstall an App from Your Store.
Alert
If you are experiencing any issues on the storefront after completing the steps above, we recommend requesting an expert installation. Your theme may require further Liquid code changes. See Request a Subscriptions Install above for more information.