1. Help Docs
  2. Implementation

🗺️ Guided Installation for Shopify Themes

Implementing Smartrr on storefronts with Shopify themes

Note—before implementing Smartrr, it's important to review Shopify's subscription requirements to determine your eligibility for offering subscriptions on your storefront. You must also have inventory tracking enabled for a product to be subscription-eligible.

 

Screen Shot 2022-02-07 at 1.12.14 PM


 

If your store is using one of Shopify’s themes that is not Dawn, or if you’ve partnered with a developer or agency to create a custom theme, you’ll be able to install Smartrr on your site by following the guided instructions below. 

 

Within the Smartrr app navigate to Setup under RESOURCES in the left-hand menu. 

 

 

Complete Steps #1-4; the four prerequisites to installation which instruct you to set up subscription programs, shipping rules, customize account portal theming, and define rules around failed payments. 

 

Implementation of Smartrr begins at Step 5 where you will install Smartrr Snippets

 

⚠️ 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.

 

Smartrr Snippets are files that are injected into your code base and will not modify any existing liquid files. Click the button +Add Smartrr Snippets.

 

 

Upon successful installation of Smartrr Snippets, the following five files will have magically appeared under the ‘Snippets’ section of your theme’s code:

 

 

Finally, in Step 6, click on Guided Install to be redirected back to this page. 

 

 

There are three files you’ll need to manually adjust: 

 

  1. Product Page
  2. Customer Account Page
  3. Order Status Page

 

1. Modifying the Product Page

 

In your duplicated theme’s code base, 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. 

 

 

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. 

 

 

The file should look like this: 

 

 

Save the file. 

 

2. 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 customers/account.liquid. This file is typically located under either the Templates heading. 

 

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

 

 

The file should look like this: 

 

 

Save the file. 

 

3. 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 and we will assist you.