Shop Now: On-Store Setup (Embedded)

Edited

OVERVIEW

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

Important:

  • 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 customer-facing updates don’t affect back-end performance. For headless setup, go to Loop's On-Store headless setup article instead.


How it works

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

  • The Shop Now feature lets the customer 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 customer directly to the store's website to make this new purchase before returning to Loop.

Shop Now: the On-Store customer experience

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


Set up Shop Now: On-Store

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

Note:

  • Loop recommends saving a backup of the previous theme before publishing the new one. Please contact a developer on the merchant's team, the merchant's Merchant Onboarding Manager, or support@loopreturns.com if help is needed 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 all the steps up to 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 merchant's Shopify home page in a separate browser tab or window.

  2. On the left sidebar, click Sales channels.

  3. When the pop-up window appears, click Online Store.

  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.

  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.

    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.

    • On the new theme, click the ellipsis button > Rename. A pop-up window will appear.

    • Enter the new name in the text field. Loop recommends naming the theme in a memorable way, such as "Theme + Loop On-Store Integration."

    • Click Save in the pop-up window.

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 Themes page, click Customize next to the new theme.

  2. On the left, click the App Embeds button.

  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.

  4. Click Save in the upper right corner of the screen.

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"

The following pop-up appears for every merchant setting up On-Store for the first time:

This pop-up appears 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"

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. Review the video below or the written steps in the sub-sections beneath it to learn how to do this.

Add the API key

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

  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.

    Tip:

    • 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. (Or, open a separate tab and go to Loop admin > Returns management > Tools & integrations > Developer tools.)

  4. Under the API Keys section of the Developers page, copy an API key that is scoped to Cart only.

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

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

  6. Click Save in the upper right corner of the theme editor window.

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 customers back to the returns experience after they choose new items to buy.

Important: Follow the steps below for each checkout button that customers could come across through the store. For example, customers 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.

  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]’”.


Note:

  • 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 support@loopreturns.com.

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.

    Important: When adding identifiers, a hash (#) should always proceed an 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.

    • To add multiple Classes or IDs, separate each value in the Checkout Button Selector field with a comma.

    • 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 support@loopreturns.com.

  4. Click Save in the upper right corner to make sure all the changes keep!

Great job! Later, when publishing the new theme, this code will activate the Shop Now: On-Store experience automatically for customers 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.

  2. Click the back arrow on the theme editor page to return to the Shopify themes.

  3. On the recently edited new theme, click the ellipsis button > Preview.

  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.

  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:

    If a credit banner doesn't appear, reach out to support@loopreturns.com.

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.

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 Networktab.

  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.

  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”:

  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 support@loopreturns.com.

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.

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.

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

  3. To allow customers to access On-Store through the portal, please enable On-Store under the merchant's return policy:

    • Go to the Loop admin > Returns management > Policy settings > Return policies.

    • Click Edit on the chosen policy, then find the Shop Now toggle (within the "Return outcomes" section).

    • Ensure the "On-store enabled" check box is selected.

    • Click Save to keep the return policy changes.

  4. Notify the merchant's Onboarding Specialist or email Loop at support@loopreturns.com!

FAQ

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 support@loopreturns.com.

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.

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 support@loopreturns.com.

Where can I find my Shop Now: On-Store API key? You can locate your API key under Loop admin > Returns management > Tools & integrations > Developer tools.

How does Loop choose which Products to display in the Shop Now preview?

  • For Shop Now: In-App, the preview displays products available in the top-level menu item that match the original products' Product Type. If no products match the original product's Product Type, Loop will display the next available products in the top-level menu item.

  • For Shop Now: On-Store, the preview will not display any product images unless you select "Import Collections" in the Shop Now tab of your admin. Once selected, add a menu item, and then the preview will display products that match the original products' Product Type.


For further questions, please contact the merchant's Merchant Onboarding Manager or support@loopreturns.com.