Shop Now: On-Store Optional Setup (Embedded)
OVERVIEW
There are several factors for merchants to consider when customizing their Shop Now: On-Store platform. These can include third-party overlaps, payment and checkout options, information given to or withheld from shoppers, and more.
This article covers optional steps merchants can choose to take to tailor their shoppers’ On-Store experience further. For initial integration instructions or a general On-Store overview, please refer to the original Shop Now: On-Store article.
Tip: Loop highly recommends having a developer or engineer present for these customizations.
- Modify the shopper experience
- Configure Shopify script discounts
- Update other customizations
- Test and publish your changes
- FAQ
Modify the shopper experience
- Hide any alternative payment methods the store offers with the typical Shopify checkout such as AfterPay, Google Pay, Apple Pay, and PayPal. These options are not compatible with Loop’s On-Store experience. This also applies to any buttons or options that offer a Home Try-On program.
- Alter or hide help chat widgets on the website, as these conflict with the On-Store credit banner.
- Adjust any mobile checkout or add-to-cart buttons, as these conflict with the On-Store experience.
- Deactivate special offer pop-ups and discount code options. Although it’s common to show these when a shopper enters a site, they distract the shopper from adding products to their cart. In addition, these discounts will not apply to items purchased through the On-Store experience.
What are elements?
For example: If the store offers alternate payment options such as the ones mentioned above, each option may have a button that shoppers can click to continue their payment (for example, the image below). Each button is an element within the store’s code.
Adjust elements
.loop-returns-activated <ANY ELEMENT CLASSIFIER> { display: none !important; }
Visualize the .loop-returns-activated Class
- Go to Shopify admin > Sales channels > Online Store.
-
Find the On-Store theme.
Note: If editing a previously published On-Store theme, do the steps below for the current theme. If making changes to a copy of the On-Store theme before publishing it, do the steps below for the relevant theme under the "Theme Library" section.
Click the ellipsis button on the theme (a set of three periods) > Edit code.
Under the Layout folder, click the file titled “theme.liquid".
Look for “<style>” and “</style>” tags in the code by scrolling or using the finder tool (Control F for Windows, Command F for Mac). Elements will be edited between these style tags.
If style tags are present, go to Step 6.
If style tags are NOT present, go to Step 7.
- Copy and paste ".loop-returns-activated" right after the <style> tag (the first style tag). Confirm that its placement reflects the snippet under Step 7, then proceed to Step 8.
- Copy and paste the snippet below under the " <head> " tag in the code:
<style> .loop-returns-activated { //where the elements will live } </style>
Click Save in the upper right corner of the theme editor window.
Hide the elements
- Open a view of the store in a separate tab or window.
- Click on a product as if to review before adding to the cart.
On this product page, right-click on the chosen element in the checkout view (for example, the Shop Pay button below).
- Click Inspect.
Copy the Class or ID highlighted in the Inspector Tool. In rare cases, the identifier for this element could also be a tag within the code.
- Go back to the theme.liquid code file and paste the previously copied Class or ID next to “ .loop-returns-activated ”. Remember to add a period (.) before a Class, and a hash (#) before an ID.
.loop-returns-activated .shop-pay-logo
- Change “display:” to “none !important;” to hide any chosen elements.
.loop-returns-activated .shop-pay-logo{ display: none !important; }
- Click Save in the upper right corner of the theme editor window.
Note: Merchants can also move these elements around in the code to change where they appear. Again, these actions turn out best with a developer's help.
Tip: To hide an element by way of JavaScript, developers can add the " LoopOnstore.isActive() " flag to any JavaScript code running in their Shopify theme (Shopify > Sales Channels > Online Store > ellipsis button for desired theme > Edit Code > theme.liquid).
Another example
A merchant wants to remove the Shop Pay button and wording from their product pages because they don't want the Shop Pay button to conflict with the On-Store experience.
The merchant would right-click on the page, then click Inspect. The Inspector Tool would show them identifiers for each element making up the Shop Pay section. The image below shows how the Shop Pay button is only one element of all the Shop Pay text on that page.
This article has explained that merchants can nest whichever selectors or elements they want to hide under a .loop-returns-activated
CSS rule (CSS means "Cascading Style Sheets", a programming language). Here, the merchant would have to hide multiple elements, since the Class for the Shop Pay button, .shopify-payment-button
, would only hide the button but not the rest of the Shop Pay text.
Important: Merchants must create a brand new CSS block for every element they want to hide.
Configure Shopify script discounts
Important: Currently, only cart and order level discounts are compatible with On-Store. Due to script discount structure and variability, support is case by case. Loop cannot guarantee support on script discounts on the line-item level, but will help with configuration where possible.
For questions or help, please contact support@loopreturns.com.
Loop’s Shop Now: On-Store experience can use a merchant’s existing Shopify cart and scripts to determine proper discounts for shoppers’ On-Store orders.
How it works
- The shopper adds items to their cart through the On-Store experience.
- The On-Store code sends any products and applicable discounts from the Shopify cart to Loop’s core API endpoint.
- Loop’s core interprets new cart prices and translates them to discounts in Loop's system.
Setup instructions
To set up discount scripts in On-Store:
- If the theme customizer is not open, go to Shopify admin > Sales channels > Online Store.
Find the On-Store theme being edited and click the Customize button.
On the left, click the App Embeds button.
Click the carrot next to On-Store SDK Integration to expand the information underneath.
Scroll down to the checkbox labeled "Enable script discount handling."
Check the "Enable script discount handling" box.
Click Save in the upper right corner of the theme editor window.
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.
Update other customizations
Preserve items in the cart
Important: Even preserved carts will not show when clicking the browser’s back arrow, as the browser arrows are separate from Loop’s software and therefore are not included in Loop’s configuration abilities. To see preserved carts when clicking back to the store, click Loop's back button instead, as shown by the image below.
To preserve items in the store's cart:
- Ensure the Shopify theme customizer is open (refer to the instructions above).
- Click the app embeds icon, then expand the On-Store SDK Integration section.
Scroll down to the checkbox labeled "Preserve cart (Recommended)".
Check the "Preserve cart (Recommended)" box.
Click Save in the upper right corner of the theme editor window.
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.
Customize the Shop Now redirect
document.addEventListener('Loop:Activated', () => { window.location.href='collections/{your-collection-name}'});
For help with this customization, please contact support@loopreturns.com.
Replace the checkout button
Merchants can customize their checkout buttons to lead shoppers back to the Loop returns experience while the shoppers are in the On-Store flow. To do this:
- Refer to the instructions above to open the Shopify theme customizer and expand the On-Store options under app embeds.
Scroll down to the checkbox labeled "Replace checkout button."
Check the "Replace checkout button" box.
Click Save in the upper right corner of the theme editor window.
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.
Refer to the initial setup article for a reminder on how to enter an existing or chosen checkout button selector (attach value) into the "Checkout Button Selector" field above this checkbox.
Change the styling
After expanding On-Store SDK Integration in the app embeds, scroll to the bottom of the sidebar. There will be options for styling the credit banner and its contents. This styling can also help prevent items overlapping on the website so that each shopper's experience is as clean as possible.
Tip: Make sure to click the the "Show On-Store bar" checkbox so that the theme shows all styling changes for testing purposes before saving.
Test and publish your changes
FAQ
For further questions, please contact your Merchant Onboarding Manager or support@loopreturns.com.