This help article outlines some common text, color, or placement changes that you can make to the standard subscription widget from within your theme files.
This article contains instructions for those who have installed standard subscription widget using Liquid code. If you have installed the Subscription widget app block (available for Shopify Storefront 2.0 themes), please visit Customize the Subscription Widget App Block.
When making changes in the theme files, it's best to work on an unpublished theme. This allows you to preview and test your styling changes without affecting your live store.
Alert: If you’ve installed Subscriptions for Shopify Checkout on your store prior to March 2023, then you may have the bsub.scss file on your store, instead of the bsub.css as shown in the CSS changes below.
Icon styling
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 image files.
The advantage of using an SVG is that you can customize the colour of the SVG, while an image is static.
To locate the files to adjust the icons, please follow the steps below.
Access the bsub-widget.liquid file
- From your Shopify admin, navigate to Sales channels > Online Store > Themes.
- Find the theme where Bold Subscriptions is installed, and select the ellipsis, then Edit Code.
- Under Snippets, locate and select the file titled bsub-widget.liquid.
Note: 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.css file around line 85.
If you are using the bsub.scss file, then you can use the .bsub-widget__image class near line 114.
- 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.
- 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.
Language styling
The language for the subscription widget can be changed in the bsub-widget.liquid file. Follow the steps below to adjust the text shown in the above example.
Access the bsub-widget.liquid file
- From your Shopify admin, navigate to Sales channels > Online Store > Themes.
- Find the theme that has Bold Subscriptions installed, and select the ellipsis, then Edit Code.
- Under Snippets, locate and select the file titled bsub-widget.liquid.
-
Purchase Options - This text can be changed on line 20.
-
One-time Purchase - This text can be changed on line 58.
-
Subscribe and Save - This text can be changed on line 96 by replacing {{- group.name -}} with the text you would like to apply.
-
Delivery Frequency - This text can be changed on line 118.
Change the order of your frequency options
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 change the order of your intervals, delete and recreate the intervals in the order you wish them to appear.
CSS styling for the standard widget
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 ShopExperts via this form.
All CSS code changes for the standard subscriptions widget need to be added to your theme's liquid code files.
Follow the instructions listed below to make your desired CSS changes.
1. Purchase Options text
- From your Shopify admin, navigate to Sales channels > Online Store > Themes.
- Find the theme that has Bold Subscriptions installed, and select the ellipsis, then Edit Code.
- Under Snippets, open bsub-widget.liquid.
- Find the line that contains the text Purchase Options.
- 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.
- Click Save.
- Under Assets, open bsub.css.
- At the very bottom of the file, copy and paste the following code, along with your CSS changes:
.purchase-options {
Enter CSS code here
} - Click Save.
2. Change widget background color
- From your Shopify admin, navigate to Sales channels > Online Store > Themes.
- Find the theme that has Bold Subscriptions installed, and select the ellipsis, then Edit Code.
- Under Assets, open bsub.css.
- Find the line of code that starts with .bsub-widget__wrapper:
- Remove the code that follows after background-color: and replace this code with a background color you would like to apply.
- Click Save.
3. Change background color of Purchase Option labels
- From the Shopify admin, navigate to Sales channels > Online Store > Themes.
- Find the theme that has Bold Subscriptions installed, and select the ellipsis, then Edit Code.
- Under Assets, open bsub.css.
- Find the line of code that starts with .bsub-widget__group-header:
Note: If you are using the bsub.scss file, you can edit the code that starts with .bsub-widget__group-label.
- Remove the code that follows after background-color: and replace this code with a background color you would like to apply.
- Click Save.
4. One-time Purchase text
- From the Shopify admin, navigate to Sales channels > Online Store > Themes.
- Find the theme that has Bold Subscriptions installed, and select the ellipsis, then Edit Code.
- Under Snippets, open bsub-widget.liquid.
- Find the line that contains the text One-time Purchase.
- 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.
- Click Save.
- Under Assets, open bsub.css.
- 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
} - Click Save.
5. Subscribe and Save text
- From the Shopify admin, navigate to Sales channels > Online Store > Themes.
- Find the theme that has Bold Subscriptions installed, and select the ellipsis, then Edit Code.
- Under Snippets, open bsub-widget.liquid.
- Find the line that contains <span> {{- group.name -}} </span>.
- 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.
- Click Save.
- Under Assets, open bsub.css.
- 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
} - Click Save.
6. Delivery Frequency text
- From the Shopify admin, navigate to Sales channels > Online Store > Themes.
- Find the theme that has Bold Subscriptions installed, and select the ellipsis, then Edit Code.
- Under Snippets, open bsub-widget.liquid.
- Find the line that contains the text Delivery Frequency.
- 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.
- Click Save.
- Under Assets, open bsub.css.
- At the very bottom of the file, copy and paste the following code, along with your CSS changes:
.delivery-frequency {
Enter CSS code here
} - Click Save.
7. Subscription frequency checkbox
- From the Shopify admin, navigate to Sales channels > Online Store > Themes.
- Find the theme that has Bold Subscriptions installed, and select the ellipsis, then Edit Code.
- Under Assets, open bsub.css.
- 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
} - Click Save.
8. Subscription frequency text
- From the Shopify admin, navigate to Sales channels > Online Store > Themes.
- Find the theme that has Bold Subscriptions installed, and select the ellipsis, then Edit Code.
- Under Snippets, open bsub-widget.liquid.
- Find the line that contains the text {{- plan.name -}}.
- 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.
- Click Save.
- Under Assets, open bsub.css.
- 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
} - Click Save.
9. Subscription price
- From the Shopify admin, navigate to Sales channels > Online Store > Themes.
- Find the theme that has Bold Subscriptions installed, and select the ellipsis, then Edit Code.
- Under Snippets, open bsub-widget.liquid.
- Find the line that contains the text data-bsub-per-delivery-price.
- 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.
- Click Save.
- Under Assets, open bsub.css.
- At the very bottom of the file, copy and paste the following code, along with your CSS changes:
.delivery-price {
Enter CSS code here
} - Click Save.
10. Divide line symbol
- From the Shopify admin, navigate to Sales channels > Online Store > Themes.
- Find the theme that has Bold Subscriptions installed, and select the ellipsis, then Edit Code.
- Under Snippets, open bsub-widget.liquid.
- Find the line that contains the text / .
- Replace this line with the following code:
<span class="bsub-divide-line"> / </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.
- Click Save.
- Under Assets, open bsub.css.
- 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
} - Click Save.
11. Subscription delivery text
- From the Shopify admin, navigate to Sales channels > Online Store > Themes.
- Find the theme that has Bold Subscriptions installed, and select the ellipsis, then Edit Code.
- Under Snippets, open bsub-widget.liquid.
- Find the line that contains the text data-bsub-delivery-frequency.
- 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.
- Click Save.
- Under Assets, open bsub.css.
- 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
} - Click Save.
12. Subscribe Only
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:
- From the Shopify admin, navigate to Sales channels > Online Store > Themes.
- Find the theme that has Bold Subscriptions installed, and select the ellipsis, then Edit Code.
- Under Snippets, open bsub-widget.liquid.
- Find the line that contains the text for Purchase Options:
- If you're looking to adjust the language, remove this variable.
- Add a new tag around line 16:
type code here
- Click Save.