Customize Subscription Widget

In this help article, are are going to go over some common text that can be changed, as well as how you can apply some custom CSS styling to the subscription widget.

 Pro-Tip

Please note this article only relates to Version 2 of Bold Subscriptions. If you have Version 1 currently installed on your store, then please visit our Configure Display Settings in Bold Subscriptions V1.

If you are unsure of which version that you have currently installed on your store, please visit Bold Subscriptions V1 & V2 Comparison.

While Bold Subscriptions V2 currently does not have a language settings page or CSS input box, the styling and language of the subscriptions widget can still be changed in the theme's liquid files.

The product price within the app is unable to dynamically adjust on the product page to reflect the subscription discount if the user selects the subscribe button on the widget. If the subscription button is selected, the discounted price will be shown next to each delivery frequency instead.

 Caution

Making adjustments to the Bold Subscriptions theme files can cause inadvertent changes to the styling of the subscription widget. We recommend working on an Unpublished Theme when making your styling changes to allow you to preview your styling changes first before applying the changes to your storefront.

 


 

Widget Language Preview

 

The language for the subscription widget can be changed in the bsub-widget.liquid file. Below you can find exactly where you can adjust each text listed as a number in the example above in the liquid file and steps you can follow to locate the liquid file where the text is generated: 

 


 

How to Access bsub-widget.liquid File

  1. From your Shopify admin, select Online Store.
  2. Select Actions, then Edit code next to the theme you have Bold Subscriptions installed on.
  3. Under Snippets, locate and select the file titled "bsub-widget.liquid".

 


 

  1. Purchase Options - This text can be changed on line 20.
    Purchase_Options.png

  2. One-time Purchase - This text can be changed on line 58.
    One-Time_Purchase_Option.png

  3. Subscribe and Save - This text can be changed on line 96 by replacing "{{- group.name -}}" with the text you would like to apply.
    Subscribe___Save.png

  4. Delivery Frequency - This text can be changed on line 118.
    Delivery_Frequency.png

Subscription Icons

The icons that are used within the widget can be updated and changed. The default icons being used are SVGs (scalable vector graphic file), but you can change them to be images instead.

The advantage of using an SVG is that you can customize the colour of the SVG, while an image is static.

Below you can find exactly where you can adjust each icon listed as a number in the example above in the liquid file and steps you can follow to locate the liquid file where the icons are generated:

 


 

How to Access bsub-widget.liquid File

  1. From your Shopify admin, select Online Store.
  2. Select Actions, then Edit code next to the theme you have Bold Subscriptions installed on.
  3. Under Snippets, locate and select the file titled "bsub-widget.liquid".

 


 

 Pro Tip

SVGs use a viewbox attribute to determine how much of the SVG you can see (using the original size of the SVG). To change the size of the SVG, you will want to make use of the width and height attributes on the SVG element within the "bsubs.scss" file on line 114.

Screen_Shot_2021-01-14_at_11.32.18_AM.png

  1. One-time purchase icon - This icon can be changed on line 45 by replacing the SVG with your own SVG, or replacing it with an img tag.

    One time Purchase Icon

  2. Subscribe and save icon - This icon can be changed on line 83 by replacing the SVG with your own SVG, or replacing it with an img tag.

    Subscribe and Save Icon

 


 

Change the Frequency Display

You can change the order in which your subscription frequencies display on your storefront from within the Subscriptions app admin. It is ultimately determined by the order in which you've created your frequency intervals.

For Example: If you have created the following intervals within your subscription group:

  • 1 Month
  • 4 Months
  • 2 Months

Your frequencies will then be shown in that order on the storefront.

To re-order already created intervals, simply delete and recreate the intervals in the order you wish for them to appear in.

 


 

CSS Styling

Bold Subscriptions currently does not have a CSS input box, which means that all CSS code changes needs to be added into your theme's liquid code.

 Pro-Tip

Making adjustments to the subscription widget does require knowledge of CSS. If you'd like one of our partners to complete a paid customization on your store, please reach out to HeyCarson via this form.

We have put together a list to help you with applying CSS changes to certain sections of the subscription widget, below.

Widget CSS Preview

  1. From your Shopify admin, select Online Store, then Actions > Edit code next to the theme that Bold Subscriptions is installed on.
  2. Under "Snippets", open bsub-widget.liquid.
  3. Find the line that contains the text "Purchase Options".
  4. Replace this line with the following code:
    <span class="purchase-options"> Purchase Options </span>

    Note: The class text can be changed to anything that you like, however, the same class must be used in the code mentioned in step 7 below.

    Purchase Options Code

  5. Select Save.
  6. Under "Assets", open bsub.scss.
  7. At the very bottom of the file, copy and paste the following code, along with your CSS changes:
    .purchase-options {  
    Enter CSS code here
    }
  8. Select Save.
  1. From your Shopify admin, select Online Store, then Actions > Edit code next to the theme that Bold Subscriptions is installed on.
  2. Under "Assets", open bsub.scss.
  3. Find the line of code that starts with ".bsub-widget__wrapper":

    Background widget code

  4. Remove the code that follows after "background-color:" and replace this code with a background color you would like to apply.
  5. Select Save.
  1. From your Shopify admin, select Online Store, then Actions > Edit code next to the theme that Bold Subscriptions is installed on.
  2. Under "Assets", open bsub.scss.
  3. Find the line of code that starts with ".bsub-widget__group-label":

    Purchase Options Label Code

  4. Remove the code that follows after "background-color:" and replace this code with a background color you would like to apply.
  5. Select Save.
  1. From your Shopify admin, select Online Store, then Actions > Edit code next to the theme that Bold Subscriptions is installed on.
  2. Under "Snippets", open bsub-widget.liquid.
  3. Find the line that contains the text "One-time Purchase".
  4. Replace this line with the following code:
    <span class="one-time-purchase"> One-time Purchase </span>

    Note: The class text can be changed to anything that you like, however, the same class must be used in the code mentioned in step 7 below.

    one time purchase code

  5. Select Save.
  6. Under "Assets", open bsub.scss.
  7. At the very bottom of the file, copy and paste the following code, along with your CSS changes:
    .one-time-purchase {  
    Enter CSS code here
    }
  8. Select Save.
  1. From your Shopify admin, select Online Store, then Actions > Edit code next to the theme that Bold Subscriptions is installed on.
  2. Under "Snippets", open bsub-widget.liquid.
  3. Find the line that contains "<span>{{- group.name -}}</span>".
  4. Replace this line with the following code:
    <span class="subscribe-and-save"> {{- group.name -}} </span>

    Note: The class text can be changed to anything that you like, however, the same class must be used in the code mentioned in step 7 below.

    subscribe and save code

  5. Select Save.
  6. Under "Assets", open bsub.scss.
  7. At the very bottom of the file, copy and paste the following code, along with your CSS changes:
    .subscribe-and-save {  
    Enter CSS code here
    }
  8. Select Save.
  1. From your Shopify admin, select Online Store, then Actions > Edit code next to the theme that Bold Subscriptions is installed on.
  2. Under "Snippets", open bsub-widget.liquid.
  3. Find the line that contains the text "Delivery Frequency".
  4. Replace this line with the following code:
    <span class="delivery-frequency"> Delivery Frequency </span>

    Note: The class text can be changed to anything that you like, however, the same class must be used in the code mentioned in step 7 below.

    delivery frequency code

  5. Select Save.
  6. Under "Assets", open bsub.scss.
  7. At the very bottom of the file, copy and paste the following code, along with your CSS changes:
    .delivery-frequency {  
    Enter CSS code here
    }
  8. Select Save.
  1. From your Shopify admin, select Online Store, then Actions > Edit code next to the theme that Bold Subscriptions is installed on.
  2. Under "Assets", open bsub.scss.
  3. At the very bottom of the file, copy and paste the following code, along with your CSS changes:
    svg.bsub-widget__checked-icon.bsub-widget__image { 
    Enter CSS code here
    }
  4. Select Save.
  1. From your Shopify admin, select Online Store, then Actions > Edit code next to the theme that Bold Subscriptions is installed on.
  2. Under "Snippets", open bsub-widget.liquid.
  3. Find the line that contains the text "{{- plan.name -}}".
  4. Replace this line with the following code:
    <span class="bsub-plan-text"> {{- plan.name -}} </span>

    Note: The class text can be changed to anything that you like, however, the same class must be used in the code mentioned in step 7 below.

    subscription frequency text code

  5. Select Save.
  6. Under "Assets", open bsub.scss.
  7. At the very bottom of the file, copy and paste the following code, along with your CSS changes:
    .bsub-plan-text {
    Enter CSS code here
    }
  8. Select Save.
  1. From your Shopify admin, select Online Store, then Actions > Edit code next to the theme that Bold Subscriptions is installed on.
  2. Under "Snippets", open bsub-widget.liquid.
  3. Find the line that contains the text "data-bsub-per-delivery-price".
  4. Replace this line with the following code:
    <span class="delivery-price" data-bsub-per-delivery-price> </span>

    Note: The class text can be changed to anything that you like, however, the same class must be used in the code mentioned in step 7 below.

    subscription price code

  5. Select Save.
  6. Under "Assets", open bsub.scss.
  7. At the very bottom of the file, copy and paste the following code, along with your CSS changes:
    .delivery-price {
    Enter CSS code here
    }
  8. Select Save.
  1. From your Shopify admin, select Online Store, then Actions > Edit code next to the theme that Bold Subscriptions is installed on.
  2. Under "Snippets", open bsub-widget.liquid.
  3. Find the line that contains the text "&nbsp;/&nbsp;".
  4. Replace this line with the following code:
    <span class="bsub-divide-line"> &nbsp;/&nbsp; </span>

    Note: The class text can be changed to anything that you like, however, the same class must be used in the code mentioned in step 7 below.

    Divide Line code

  5. Select Save.
  6. Under "Assets", open bsub.scss.
  7. At the very bottom of the file, copy and paste the following code, along with your CSS changes:
    .bsub-divide-line {
    Enter CSS code here
    }
  8. Select Save.
  1. From your Shopify admin, select Online Store, then Actions > Edit code next to the theme that Bold Subscriptions is installed on.
  2. Under "Snippets", open bsub-widget.liquid.
  3. Find the line that contains the text "data-bsub-delivery-frequency".
  4. Replace this line with the following code:
    <span class="bsub-delivery-text" data-bsub-delivery-frequency>delivery</span>

    Note: The class text can be changed to anything that you like, however, the same class must be used in the code mentioned in step 7 below.

    Delivery text code

  5. Select Save.
  6. Under "Assets", open bsub.scss.
  7. At the very bottom of the file, copy and paste the following code, along with your CSS changes:
    .bsub-delivery-text {
    Enter CSS code here
    }
  8. Select Save.

When your products are set up as "Subscribe Only", the customization set up is slightly different than the standard widget.

To adjust the Purchase Options Text for Subscribe only products:

  1. From the Shopify admin, select Online Store.
  2. Select Actions > Edit Codes next to the theme you'd like to customize.
  3. Under "Snippets", open bsub-widget.liquid.
  4. Find the line that contains the text for "Purchase Options":
    Purchase_Options_Text.png
  5. If you're looking to adjust the language, remove this variable.
  6. Add a new tag around line 16:
    type code here
  7. Select Save.
Was this article helpful?
0 out of 0 found this helpful