The script is required for Candy Rack to run properly. If you have changed your theme you can simply reinstall the app (all upsells, data, etc. will be saved), ask us to insert it for you or insert it manually following the steps below.
1. Add a script to theme.liquid
Go to your store
SALES CHANNELS
»Online Store
»Themes
»Actions
»Edit code
Open
theme.liquid
in the Layout folder, add the following code:
{% render 'digismoothie-candyrack' %}
before the </head>
closing tag, and save. Please see the screenshot below for a reference.
2. Add a snippet
Scroll down to the Snippets
section and click on Add a new snippet
. Enter the snippet name digismoothie-candyrack.liquid
, insert the following code and save:
<!-- candyrack-script -->
{{ 'candyrack-config.js' | asset_url | script_tag }}
<script src="https://candyrack.ds-cdn.com/static/main.js?shop={{shop.permanent_domain}}"></script>
<!-- / candyrack-script -->
Please see the screenshot below for a reference.
3. Add a config file
Scroll down to the Assets
section and click on Add a new asset
. Select Create a blank file
, name it candyrack-config
, select .js
extension, and click on Add asset
. Please see the screenshot below for reference.
Insert the following code to the candyrack-config.js
file and save:
CANDYRACK_DOCUMENT_LISTENER = true;
And that's it! You can also reinstall the app to do all this automatically (all your upsells, settings, data are saved), or just let us know we can do it remotely for you.
If you uninstall the app, keep in mind to remove these files from your theme. You can follow this guide to walk you through the cleanup process.
If you have any other questions feel free to contact us at support@digismoothie.com or via the in-app chat.