For the complete documentation index, see llms.txt. This page is also available as Markdown.

🗺️Installing Smartrr on a custom Shopify theme (Guided Install)

Implementing Smartrr on storefronts with modified Shopify themes or custom liquid themes

Coming from our app? Click here to skip directly to guided install instructions.

Table listing considerations for subscription products (sales channel support, discounts, payment gateways, draft order restrictions) and the five supported payment gateways: Shopify Payments, PayPal Express, Authorize.net, Adyen and Stripe.

If your store is using one of Shopify’s 2.0 free themes, and have not made any customizations your your theme’s source code, you’re eligible for our simple one-click automated install of Smartrr via our in-app Setup page.

Smartrr works with New customer accounts, with one difference: Smartrr's modern account portal doesn't replace Shopify's account page. Instead, you link customers to it from a menu, in one of two ways:

  • Link the app proxy URL (no theme edits needed). Add your store's Smartrr proxy URL as a menu item in the New customer accounts menu or your store's main menu. For new installs, the proxy path is /a/subscriptions/customer-portal, for example https://yourstore.com/a/subscriptions/customer-portal. To confirm your store's path, open Shopify's app settings and find the proxy URL in Smartrr's app details.

  • Render the portal on its own page. Create a page that displays the portal, then link that page from a menu. [See how to set up the Smartrr account portal on its own page →]

The customer account settings page in the Shopify admin. Shopify's new customer account doesn't provide a liquid file for the Smartrr customer portal to inject into. Instead, the Smartrr customer portal needs to be rendered on its own page and added to Shopify's customer account portal's menu options.

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

There are two parts to Smartrr setup: Subscription setup and On-site setup. Each has its own tab with required steps to get Smartrr up and running.

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.

Gif highlighting the steps to create a demo subscription program.

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. Learn more about setting up a Subscription Program here.

2. Select subscription products

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

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.

Gif highlighting the steps to add a demo product.
Gif highlighting the steps to add the newly created demo product to your Shopify store's "Online Store" sales channel.

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.

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:

The Smartrr dashboard's setup view, showing the "Optional: Smartrr optimizations" list.

On-site setup

1. Install Smartrr snippets

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.

Note: If you're planning on using Smartrr's subscription widget, leave the I'm planning on using Smartrr's subscription widget box checked. If you're not using a liquid Shopify theme compatible with app blocks, and/or 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.

Gif highlighting the steps to install Smartrr snippets on a Shopify theme.

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 not using a liquid Shopify theme compatible with app blocks, and/or 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.

On this same setup page, the "Guided install" button is the last option shown at the end of the page. Scroll down and click this button to start the guided installation.

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.

Locate the theme file responsible for building the product form (includes variant pickers and the add to cart button). This is could be the snippets/main-product.liquid or snippets/buy-buttons.liquid files.

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.

When added, the product form should look something like this:

Render the Smartrr widget within the product form using the line {% render 'smartrr-product' %}.

Save the file. You should be able to preview Smartrr on your site upon successfully modifying this product form. Having trouble? Skip to Troubleshooting steps.

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 main-account.liquid or 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:

For legacy Shopify customer account portals, you can render the Smartrr customer portal instead by including {% render 'smartrr-account' %} at the top of the customer account liquid file (usually named account.liquid). For Shopify's new customer account portal, you'd want to create a page template, add the render line there, create a page and connect that page to the template. You can link that page to a menu (the store's main menu or the customer accounts portal menu list).

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 support@smartrr.com and we will assist you.

Troubleshooting

Why don't I 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.

If the Smartrr widget doesn't render, be sure to confirm your subscription program is created, includes products and is saved.

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 Grow and Excel plans.

Last updated