Adding Clearpay site messaging
Adding Clearpay site messaging
Site messaging means making your customers aware of the Clearpay payment method on the product and shopping cart pages of your Shopify website.
Complete these steps to place Clearpay visual assets on the product and cart pages of your Shopify website:
-
In your Shopify Admin page, navigate to Sales Channels > Online Store > Themes.
-
Click the Actions dropdown, then click Edit Code.
-
Under Layout, click theme.liquid.
-
Click the Copy to Clipboard icon to copy the javascript code below.
- Scroll to the bottom of the theme.liquid file and click to set the cursor to the line below
</html>.
- Paste the copied text to the bottom line of the file.
- Click Save.
- If the Clearpay messaging does not appear in your desired location, update the selectors within the script to match your theme. For the Product Page, update the selectors on lines 14–16. For the Cart Page, update the selectors on lines 20–23.
- The product selector and cart static selector control the positioning of the Clearpay messaging. If required, uncomment lines 15 and 21, set the fallback option to true, and update the fallback selectors to target the product page and cart page price elements.
- Select Save to apply your changes. The updated selectors will take effect immediately.
Sliding cart messaging option
To show the messaging in the sliding cart, you must uncomment the line // var clearpay_dynamic_cart_integration_enabled and explicitly set it to true, for example, var clearpay_dynamic_cart_integration_enabled = true; and provide a valid clearpay_dynamic_cart_selector.