Shop Now: On-Store Setup (Embedded)


Loop's Shop Now: On-Store feature uses a store’s product collections in Shopify to encourage shoppers to make exchanges instead of returns. The resulting exchanges help merchants retain and increase revenue.


  • Only merchants using Shopify 2.0 (a Shopify update adding more feature and tooling options, as well as architecture upgrades) have access to embedded On-Store. Merchants that do not use Shopify 2.0 can still set up and use Loop's original On-Store feature.
  • These setup instructions are for merchants using Shopify's theme builder. If a merchant does not use Shopify themes or creates their own, they probably have a "headless" Shopify store. Headless means that the store is built with the front end separate from the back end so that shopper-facing updates don’t affect back-end performance. For headless setup, go to Loop's On-Store headless setup article instead.

In this article:

How it works

The Shop Now: On-Store experience has two parts:

  • The Shop Now feature lets the shopper exchange an item they bought with any other item from the store's catalog while they're still in the Loop portal.
  • The On-Store version of Shop Now brings the shopper directly to the store's website to make this new purchase before returning to Loop.

Shop Now: the On-Store shopper experience

Check out the video below to understand what this shopper experience looks like!

Set up Shop Now: On-Store

Follow the instructions below to set up the On-Store feature. After doing these steps, more details can be added based on the store’s specific needs.


  • Loop recommends saving a backup of the previous theme before publishing the new one. Please contact a developer on your team, your Merchant Onboarding Manager, or if you need help saving a backup.
  • These instructions are for the Chrome browser, but the steps will look generally similar in any browser. 

Get On-Store into Shopify's theme editor

Because the current theme is likely not set up for On-Store, merchants must create a new theme to connect to the On-Store feature. Play the video below or review the written instructions beneath it to learn how to set up a new theme. The video covers instructions before the "Fill in the blanks" header.

Set up a development theme in Shopify

First, set up a space in the store's Shopify account to enable the On-Store experience:
  1. Open the Shopify admin page in a separate tab or window in the browser.
  2. On the left sidebar, click Sales channels.

    Sales channels section of Shopify sidebar.
  3. Click Online Store when the pop-up window appears.

    Online Store option within Sales channels.
  4. After the page loads, the store's current live theme should appear in the middle of the screen. Click the ellipsis button (a set of three periods) on the right side of the current live theme.

    Current theme with ellipsis button on the right.
  5. From the ellipsis menu, click Duplicate. A copy of the current theme will appear in the "Theme library" section of the page with a “Just Added” tag next to the “Copy of [theme]” title.

    Newly-added theme in Shopify with "Just added" tag next to title.

    Important: Do NOT click Publish on the new theme yet, as doing this will activate the new theme before setup is done.

  6. Rename the new theme as needed.
    1. On the new theme, click the ellipsis button > Rename. A pop-up window will appear.

      "Rename" button on newly-added theme.
    2. Enter the new name in the text field. Loop recommends naming the theme in a memorable way, such as "Theme + Loop On-Store Integration."
    3. Click Save in the pop-up window.

      "Save" button on new theme.

Tip: As edits continue, merchants may not always need to duplicate the theme before making changes. Loop recommends duplicating at first so that, if making changes to the theme code, merchants can test them before publishing.

Toggle on On-Store

To toggle on On-Store for the theme, follow the steps below:

  1. On the theme page, click Customize next to the new theme.

    Example theme with Customize button on the right.
  2. On the left, click the App Embeds button.

    App embeds button on the left of the Customize view of store theme.
  3. Click on the On-Store SDK Integration switch. The toggle will move to the right, and the bar will highlight dark blue, as shown below.

    On-Store switch, toggled on to show a highlighted blue switch.
  4. Click Save in the upper right corner of the screen.

    Save button in Shopify's theme customizer.

Note: If clicking between browser windows, and the checkbox has trouble showing (even after saving), please refer to the "toggle or checkbox" section of the On-Store Troubleshooting article.

Important pop-ups

After toggling the On-Store button on, a few pop-ups may appear. Below are explanations of each.

"On-Store Feature Not Available"

"On-Store Feature Not Available" pop-up message in Shopify theme customizer.

This pop-up appears for every merchant setting up On-Store for the first time because the feature must have an API key from the shop to activate. It should disappear after following the steps below to enter an API key. If the pop-up stays, refer to Loop's On-Store troubleshooting article to figure out why.

"Loop Manual On-Store is Already Running"

"Loop Manual On-Store is Already Running" pop-up message in Shopify theme customizer.

This pop-up shows when the older, more manual version of On-Store is already active for this store.

Note: Merchants may (and should) continue embedded On-Store setup; however, the new setup will not work until the merchant disables the old setup.

Fill in the blanks

Next, enter the remaining values for the On-Store snippet. Each sub-section below has both video and written steps to follow.

Add the API key

  1. Click the carrot next to the store to expand the information underneath.

    Expansion carrot to the left of the store name on the theme customization page.
  2. Click on the checkbox that says "Show On-Store bar." Doing this will show how the On-Store bar looks on the theme for visibility during setup and testing.

    "Show On-Store bar" checkbox in Shopify theme customizer.


    • When editing the theme for purposes outside of On-Store, merchants can un-check this box to hide the bar without turning off On-Store.
    • If clicking between browser windows, and the checkbox has trouble showing (even after saving), please refer to the On-Store Troubleshooting article.
  3. Click on the Developers Portal highlight to get an API key.
  4. Or, open a separate tab and go to Loop admin > Settings > Developers.

    Developers Portal link in On-Store API Key instructions.
  5. Under the API Keys section of the Developers page, copy an API key that is scoped to Cart only.

    From left to right: the "Generate API key" button, a scope of Cart, and the copy button next to the API key (blurred) in the "API keys" section.

    Tip: If there is no API key with a scope of "Cart" only, click the "Generate API key" button to make one.

  6. Paste the API key into the "Loop API Key (text input)" field in the Shopify theme customizer.

    "Loop API Key (text input)" field with example API key pasted into it.
  7. Click Save in the upper right corner of the theme editor window.

    Save button in Shopify's theme customizer.

Important: If, after entering the API key, the "On-Store Feature Not Available" pop-up still shows, please refer to Loop's On-Store troubleshooting article to figure out why.

Add the checkout button selector(s)

Next, add the Class or ID for the checkout button(s). Loop uses these identifiers (sometimes called attach values) to send shoppers back to the returns experience after they choose new items to buy.

Important: Follow the steps below for each checkout button that shoppers could come across through the store. For example, shoppers could add items and check out through a side cart that shows on the same page as the inventory, or they could open their cart and check out from the main cart page.

To find these values:

  1. Open the Shopify store in a new tab.
  2. Right-click the checkout button and select Inspect to open the Inspector Tool.

    Opening the Inspector Tool.
  3. In the highlighted part of the Inspector Tool, find the ID or Class, which are unique identifiers for the checkout button. This will look like “id=‘[id]’” or “class=‘[class]’”.

    Locating the checkout button Class in the Inspector Tool.


  • The checkout button may have both a Class and an ID, or more than one of each.
  • If a unique ID does not exist for the checkout button, one may be present in the theme's Themes section by way of clicking Edit Code in the ellipsis menu, then opening “cart-template.liquid”. However, the placement of the identifier(s) depends on the particular theme. For help finding or creating a unique ID, please reach out to

To add the Class or ID values:

  1. Copy the part in quotes for the ID or Class within the Inspector Tool.
  2. Add the value to the Shopify theme customizer's "Checkout Button Selector (text input)" field.

    Example ID in the "Checkout Button Selector (text input)" field.

    Important: When adding identifiers, a hash (#) should always proceed and ID, and a period (.) should always proceed a Class.

  3. If the shop provides checkout buttons in both a side cart and a cart page, add the Class or ID for each button so that the backend code connects both buttons to the On-Store flow.
    1. To add multiple Classes or IDs, separate each value in the Checkout Button Selector field with a comma.
    2. If wanting to create one Class or ID that represents more than one checkout button, go to the theme page > the ellipsis button for the theme > Edit Code. Then add a common value manually within the "theme.liquid" file, as well as in the "Checkout Button Selector (text input)" field. For help with this, please contact
  4. Click Save in the upper right corner to make sure all the changes keep!

    Save button in Shopify's theme customizer.

Great job! Later, when publishing the new theme, this code will activate the Shop Now: On-Store experience automatically for shoppers coming from Loop. Adding the API key also lets the store's code talk to Loop’s API.

Test your work

Next comes testing all this work to make sure On-Store is functioning as expected. For any troubleshooting needed during testing, please refer to Loop's On-Store Troubleshooting article.

Tip: Loop highly suggests using a developer’s or engineer’s help here.

Test the setup

To test the work:
  1. Click Save in the theme customizer to make sure all of the changes stick.

    Save button in Shopify's theme customizer.
  2. Click the back arrow on the theme editor page to return to the Shopify themes.

    Back button in the Shopify theme customizer window.
  3. On the recently edited new theme, click the ellipsis button > Preview.

    "Preview" button on new theme.
  4. Right-click anywhere on the new Preview tab and select Inspect.
  5. Click the Console tab at the top of the Inspector Tool. If struggling to find the Console tab, try clicking the carrot symbol to show more options.

    Console and arrow tabs in the Inspector Tool.
  6. Scroll to the bottom of the code in the Console tab.
  7. Type “LoopOnstore.testMode()” at the very end of the code. (Or, copy and paste it from here.)
  8. Press Enter on the keyboard. A credit banner should appear at the bottom of the Preview page:

    Credit banner example showing a money amount in available credit.
    Example credit banner.

    If a credit banner doesn't appear, reach out to

Test the checkout button(s)

Merchants must also test the checkout button to confirm that the Loop.submit function works. Below the GIF (graphics interchange format) visual are written instructions to follow.

Important: if the shop provides multiple checkout buttons (for example, in both a side cart and a cart page), Loop suggests testing all checkout buttons separately using the instructions below.

GIF walk-through of checkout button test.

To test the checkout button(s):

  1. In the Preview (see Test the setup for help previewing the theme), add any product to the cart.
  2. Right-click anywhere to open the Inspector Tool again and click the Network tab.
  3. Underneath the tab names, make sure the "Preserve log" checkbox is selected. If it isn’t, click the “Preserve log” square to select it.

    Network tab and selected "Preserve log" checkbox.
  4. Click the checkout button within Shopify. Again, click each separate checkout button on the shop's website. Doing so should display a pop-up on the screen saying “Test Mode Successful”:

    "Loop On-Store Installed: Test Mode Successful" pop-up.
  5. Developers can also check that no unexpected responses or errors appear under the Network tab.

Tip: If the "Test Mode Successful" pop-up does not appear when clicking the checkout button(s), please review Loop's On-Store troubleshooting article to double-check the setup. For more testing help, please contact

Optional setup details

Once the tests are successful, visualizing this integration on the store website is possible. However, Loop recommends also reviewing the optional setup steps before publishing the new theme, in case the store has additional needs Loop can help resolve. Please consider the article above with a developer before continuing. After setting up anything else needed, continue below.

Publish the Shop Now: On-Store theme

After setup and testing, the theme is ready to launch! Below the GIF are written instructions to follow.
GIF walk-through of publishing a theme in Shopify.

To publish the On-Store theme in Shopify:

  1. Go to Shopify admin > Sales channels > Online Store.
  2. Click the Publish button next to the theme being published. This will display the new theme on the storefront immediately.

    "Publish" button on new theme in Shopify admin.
  3. Notify your Onboarding Specialist or email us at!

A developer can also make a call directly in their browser to “LoopOnstore.isActive()” to confirm that a shopper will have the On-Store experience.


Which Loop plan do I need to have to utilize this feature? To check to see if this feature is included in your plan, please review the Pricing page on the Loop Returns website. If you're interested in this adding this feature, please contact your Merchant Success Manager or

Why can't I see or use the embedded On-Store version? Embedded On-Store is only available to merchants on Shopify 2.0, a Shopify update adding more feature and tooling options, as well as architecture upgrades. You may be on 2.0 already if you see an "add section" theme within the Shopify theme customizer.

Theme customizer in Shopify with
Theme customizer in Shopify with "Add section" option highlighted.

If not using this version of Shopify, you can either a) look into migrating your themes and apps to 2.0 or b) use Loop's original On-Store feature.

Now that I’ve integrated the Shop Now: On-Store experience, can I still safely edit my theme? Absolutely! Loop recommends you save a backup of your previous theme and test the On-Store experience thoroughly after making any changes. Refer to the “Test the setup” section of this article for testing instructions.

I made a theme change and now my checkout button isn’t working correctly through the Shop Now: On-Store experience. What should I do? Review the steps for “Set up a development theme in Shopify“ above. If the problem continues, please contact your Merchant Onboarding Manager or

Where can I find my Shop Now: On-Store API key? You can locate your API key under Loop admin > Settings > Developers.

If you have any questions, please contact your Merchant Onboarding Manager or
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.