Explanation:
The Clearpay Messaging code snippet allows you to manually add Clearpay Messaging to the Product and Cart Pages. You can do this by copy-pasting the Clearpay Messaging code snippet into your Shopify Liquid template file. From there, you can modify certain lines of the code snippet to properly render Clearpay Messaging with product variants.
Action:
Please follow the below steps:
- If you have not implemented the Clearpay Messaging code snippet yet, first follow these steps here.
- If you have already implemented the Clearpay Message code snippet, you will need to edit the code snippet within Themes.
- To do this, go to Sales channels > Online Store > Themes.
- Navigate to the current theme, then go to Actions > edit code.
- Under the Layout folder, click theme.liquid.
- Scroll down to the bottom until you locate the Clearpay code snippet and the following lines of code:
// var clearpay_product_integration_enabled = true;
// var clearpay_product_selector = '#product-price-selector';
// var clearpay_variable_price_fallback_selector = '';
// var clearpay_variable_price_fallback_method = 'interval'; // Can be 'mutation' or 'interval'.
- The recommendation is to “uncomment” (remove the “//”) these lines and update the value for both var clearpay_product_selector and var clearpay_variable_price_fallback_selector. Some experimentation or testing may be required to ensure the correct selector and variable is specified for the Product Pages in question.
- If the above steps are unfamiliar to you, it is best to involve a developer resource to help identify and test the correct values for var clearpay_product_selector and var clearpay_variable_price_fallback_selector.
Important Notes:
The code examples mentioned in the step by step links are in Liquid which is Shopify's own coding language.
Related Links: