# Installing Smartrr on a custom Shopify theme (Guided Install)

Last updated: May 14, 2025

{% hint style="info" %}
Coming from our app? [<mark style="color:blue;">Click here</mark>](#guided-install) to skip directly to guided install instructions.
{% endhint %}

{% hint style="warning" %}
**Note:** Before implementing Smartrr, it's important to [review Shopify's subscription requirements](https://help.shopify.com/en/manual/products/subscriptions/setup#eligibility-requirements) to determine your eligibility for offering subscriptions on your storefront. You must also have [<mark style="color:blue;">inventory tracking</mark>](https://help.shopify.com/en/manual/products/inventory/transfers/enable-tracking) enabled for a product to be subscription-eligible.
{% endhint %}

<figure><img src="https://3658670565-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FndNAuxS4koYyI8AQTpS9%2Fuploads%2F6m0tkvgugzFYBpws27DM%2FScreen%20Shot%202022-10-18%20at%2011.29.39%20AM.png?alt=media&#x26;token=fda7d5a4-a19a-4270-938a-1a36e90d5347" alt=""><figcaption></figcaption></figure>

If your store is using [<mark style="color:blue;">one of Shopify’s 2.0 free themes</mark>](https://themes.shopify.com/themes/dawn/styles/default), and have not [<mark style="color:blue;">made any customizations your your theme’s source code</mark>](https://help.shopify.com/en/manual/online-store/themes/theme-structure/extend/edit-theme-code), you’re eligible for our simple one-click automated install of Smartrr via our in-app Setup page.

{% hint style="info" %}
As of 2023, Shopify has begun offering **New customer accounts** as a setting option. New customer accounts are not compatible with apps; please ensure you are using **Classic customer accounts** with Smartrr in order to display our <mark style="color:blue;">Modern Account Portal</mark> where your customers will be able to access and manage their subscriptions.

![](https://3658670565-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FndNAuxS4koYyI8AQTpS9%2Fuploads%2FwBEi2G2QrcDlsYq7BLbH%2FScreenshot%202023-02-24%20at%2008.39.57.png?alt=media\&token=23c62ad1-efb9-48b4-84b9-354faa56f51d)
{% endhint %}

Within the Smartrr app navigate to **Setup** under RESOURCES in the left-hand menu.&#x20;

<figure><img src="https://3658670565-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FndNAuxS4koYyI8AQTpS9%2Fuploads%2Fghw4DkxZse2SWhXKigrp%2Fsubscription-setup.png?alt=media&#x26;token=b9300045-5fc5-4afc-8cd5-291126466d34" alt=""><figcaption></figcaption></figure>

## Subscription setup

### 1. Set up a subscription program

Subscription Programs are the heart of the Smartrr app. If you're just getting started with subscriptions, we can create a demo program for you by clicking **Use a demo program**. This will automatically create a "Subscribe & Save 10%" program for your shop.&#x20;

<figure><img src="https://3658670565-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FndNAuxS4koYyI8AQTpS9%2Fuploads%2FIl6XPcUdzBHkn94FpnU9%2Fuse-demo-program.gif?alt=media&#x26;token=bd3bfb47-2baa-46fd-ac4a-ad18e15d51a6" alt=""><figcaption></figcaption></figure>

Alternatively, you can create a new program from scratch by pressing **Create my own program**. You'll be redirected to our Subscription Program tab to complete this step. [<mark style="color:blue;">Learn more about setting up a Subscription Program here.</mark>  ](https://help.smartrr.com/docs/support/subscription-setup/how-do-i-set-up-subscription-programs)

### 2. Select subscription products

Now that your Subscription Program is created, your next step is to assign a product/s to this program.&#x20;

Similarly to above, Smartrr can create a demo product for you if you press **Use a demo product**. This will create a *Smartrr Snack Cookie (Demo)* in your Shopify shop. You can use this demo product for previewing purposes, and will be able to delete it at a later date directly within your Shopify admin.&#x20;

<figure><img src="https://3658670565-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FndNAuxS4koYyI8AQTpS9%2Fuploads%2FNSJ4zqLaNFDRWgMQyk4s%2Fuse-demo-product.gif?alt=media&#x26;token=753f2b7d-1f68-4d1c-8a8f-29573d7a154f" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
**Note:** If you select to create a Demo Product, it won't appear in previews or in your storefront until you go to your Shopify admin and set the product sales channel availability to "Online Store".&#x20;
{% endhint %}

<figure><img src="https://3658670565-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FndNAuxS4koYyI8AQTpS9%2Fuploads%2Fx6rYy32NV8pNTrS2j2xk%2Fmanage-sales-channel.gif?alt=media&#x26;token=b4334007-d2ea-4717-ba2d-211b881d91c5" alt=""><figcaption></figcaption></figure>

If you want to start with one of the existing products in your shop, press **Select from existing products**. You can select one or multiple products from the modal that appears.&#x20;

{% hint style="warning" %}
**Note:** We recommend always using [<mark style="color:blue;">variants</mark>](https://help.shopify.com/en/manual/products/variants) for your Shopify products when offering subscriptions, even if there is only one option for your product. Shopify auto-assigns a "Default variant" to a product that does not have any variants associated with it. If you decide to add variants to a product at a later date, and subscriptions are already running with the "Default variant", then those subscriptions will fail and will need to be re-mapped.&#x20;
{% endhint %}

### *Optional:* Smartrr optimizations

Now that you've completed the required Subscription setup steps, explore the remaining cards on this tab for ways you can further optimize your subscription business:&#x20;

* [<mark style="color:blue;">Setup subscription loyalty rewards & referrals</mark>](https://help.smartrr.com/docs/support/admin-portal/loyalty)
* [<mark style="color:blue;">Create dedicated shipping profiles for subscription purchases</mark>](https://help.smartrr.com/docs/support/subscription-setup/shipping-methods)
* <mark style="color:blue;">Customize the look and feel of your customer account portal</mark>
* [<mark style="color:blue;">Enable a passwordless login experience</mark>](https://help.smartrr.com/docs/support/admin-portal/passwordless-login)
* [<mark style="color:blue;">Set rules around failed payment attempts</mark>](https://help.smartrr.com/docs/support/transactions/failed-payments)
* [<mark style="color:blue;">Integrate with the ecosystem’s best</mark>](https://help.smartrr.com/docs/support/integrations/available-integrations-with-smartrr)

<figure><img src="https://3658670565-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FndNAuxS4koYyI8AQTpS9%2Fuploads%2FSOGWJVl218MJYFShmT8r%2Fsmartrr-optimizations.png?alt=media&#x26;token=dbb563cb-e9bc-4cf9-be94-5421157b48a3" alt=""><figcaption></figcaption></figure>

## On-site setup

### 1. Install Smartrr snippets

{% hint style="warning" %}
**Warning:** To prevent Smartrr from showing up on your site before you're ready to launch, we recommend navigating back to Shopify’s Themes to duplicate a copy of your current theme (Actions > Duplicate). Name it something that is easily recognizable, such as **\[Your Store] Smartrr Integration Copy \[Date]** so that when you modify the below code, you know you are updating the correct theme.

![](https://3658670565-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FndNAuxS4koYyI8AQTpS9%2Fuploads%2FIThbxrXwc01bsOzTfVqY%2FScreen%20Shot%202022-03-18%20at%2011.22.44%20AM.png?alt=media\&token=6516717d-6ec9-469b-8a0e-92267f10bbd2)
{% endhint %}

Select the Shopify theme you'd like Smartrr snippets to be in stalled on. Smartrr Snippets are files that are injected into your code base and will *not* modify any existing liquid files. These are required in order to render Smartrr on your storefront. There are five files that will be added under the **Snippets** section in your theme's liquid code.

{% hint style="info" %}
Note: If you're planning on using [<mark style="color:blue;">Smartrr's subscription widget</mark>](#2.-add-smartrr-subscription-widget), leave the ***I'm planning on using Smartrr's subscription widget box*** checked. If you're *<mark style="color:red;">not</mark>* using a liquid Shopify theme compatible with app blocks, *<mark style="color:orange;">and/or</mark>* are planning to manually render subscription options on your shop's PDPs with the assistance of a developer, uncheck this box. \
\
If you're unsure, no worries. You can always duplicate a clean version of your Shopify theme and re-install Smartrr snippets again.
{% endhint %}

<figure><img src="https://3658670565-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FndNAuxS4koYyI8AQTpS9%2Fuploads%2FbUF9NaQpP0D3PjgFEAmF%2Finstall-snippet.gif?alt=media&#x26;token=939e3f89-810b-4190-a9c5-f6832da418aa" alt=""><figcaption></figcaption></figure>

### 2. Add Smartrr subscription widget (Guided install)

Smartrr's subscription widget is an app block that can be added to your Default product page from your Shopify theme's online customizer. However, if you're *<mark style="color:red;">not</mark>* using a liquid Shopify theme compatible with app blocks, *<mark style="color:orange;">and/or</mark>* are planning to manually render subscription options on your shop's PDPs with the assistance of a developer, you'll need to use our guided install process.

<figure><img src="https://3658670565-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FndNAuxS4koYyI8AQTpS9%2Fuploads%2FuI1XzKEdTTvH7FLalU1m%2FScreenshot%202023-04-12%20at%2019.21.19.png?alt=media&#x26;token=0f77d0d6-abe0-4a08-919b-2be9de0f677f" alt=""><figcaption></figcaption></figure>

#### 1. Modifying the Product Page

In your duplicated theme’s liquid code files, find the liquid file where your site’s product form information is being stored. This is usually called **main-product.liquid** or **product.liquid**. This file is typically located under either the **Sections** (for Online Store 2.0) or **Templates** (for older Shopify themes) heading.

<img src="https://3658670565-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FndNAuxS4koYyI8AQTpS9%2Fuploads%2FzQBXhsaYF7nxQdpV95So%2FSmartrr%20Help%20Docs%20%E2%80%93%206.jpg?alt=media&#x26;token=58159c79-52c1-4a84-9589-5fb4571b7297" alt="" data-size="original">

Once you’ve opened the file, search for the product form {%- form 'product'}, paste the following Smartrr snippet inside the form. We typically recommend placing between the variant selector and the quantity selector, but you can place in any order you see fit.&#x20;

```
{% render 'smartrr-product' %}
```

When added, the product form should look something like this:&#x20;

![](https://3658670565-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FndNAuxS4koYyI8AQTpS9%2Fuploads%2FwMSThbnxbYRUq55KgJtZ%2FSmartrr%20Help%20Docs%20%E2%80%93%207.jpg?alt=media\&token=de47868e-0223-4344-ba51-f637a888a7e3)

Save the file. You should be able to preview Smartrr on your site upon successfully modifying this product form. Having trouble? Skip to [**Troubleshooting**](#troubleshooting) steps.

#### 3. Modifying the Customer Account Page

In your duplicated theme’s code base, find the liquid file for your store’s account page. This is usually called **main-account.liquid** or **customers/account.liquid**. This file is typically located under either the **Templates** heading.&#x20;

At the very beginning of the file, paste the following snippet:

```
<!-- BEGIN SMARTRR SNIPPET -->{% render 'smartrr-account' %}<!-- END SMARTRR SNIPPET -->
{{ 'customer.css' | asset_url | stylesheet_tag }}
```

The file should look like this:&#x20;

![](https://3658670565-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FndNAuxS4koYyI8AQTpS9%2Fuploads%2FGA2d6aqITWxEE2huu0ur%2FSmartrr%20Help%20Docs%20%E2%80%93%208.jpg?alt=media\&token=9a0ea82b-325f-4e38-aff0-6b77d08b838c)

Save the file.&#x20;

#### 4. Modifying the Order Status Page

If you would like to display a link to your customer’s Account Portal from the order status page, please email us at [hello@smartrr.com](mailto:help@smartrr.com) and we will assist you.

## Troubleshooting

#### Why don't see Smartrr on my theme once I preview?

Whether you've created a demo Subscription Program or made a new program from scratch, you may need to double check and make sure your program details have been successfully "saved". To do this, go to **Subscription Programs** > **Manage Program**. Check and see if there is a Discard / Save banner at the top, and click the green **Save** button.

<figure><img src="https://3658670565-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FndNAuxS4koYyI8AQTpS9%2Fuploads%2FEbJextTYappmOn100Tqw%2Fsave-subscription-program.png?alt=media&#x26;token=69be3b6d-2792-4e33-a6d9-c13bdf65fab4" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Still having trouble installing and don’t have access to a developer? We partner with a handful of excellent agencies. We also offer full white-glove onboarding support with our [<mark style="color:blue;">Grow and Excel plans.</mark>](http://smartrr.com/pricing)
{% endhint %}
