Note: This guide is for customers who want to migrate from the old version of the Shopify checkout checkbox to the new version. In the old version of the checkbox, you had to add a code snippet to Attentive to enable the checkbox.
If you’re not sure whether you need to remove a code snippet, please reach out to your Attentive CSM or contact our White Glove team (whiteglove@attentivemobile.com) before proceeding with the steps in this guide.
Before our Shopify integration update (which occurred on October 6, 2021), your Shopify Plus site had to be modified with custom code in order to enable the marketing opt in checkbox.
With our integration update, you no longer need to modify your site code to add the Attentive checkout checkbox. The Shopify built-in checkbox makes it easier to enable the SMS opt-in option at checkout. Then, you can integrate seamlessly with Attentive to enable transactional or marketing SMS messages.
We recommend that you remove the Attentive code from your Shopify Plus account if you would like to use the Shopify built-in checkbox. Complete the steps outlined in this article and demonstrated in the following video:
Step 1. Locate the checkout.liquid file
Complete the following steps to locate your checkout.liquid file:
- From your Shopify site, go to Settings > Checkout.
- Click Customize checkout in the Style section. The Site Builder appears.
- Click the menu icon (three horizontal dots) in the top-left corner and select Edit code.
- Locate the checkout.liquid file.
-
-
Note: You can enter checkout in the Search field to find the checkout.liquid file.
-
Note: You can enter checkout in the Search field to find the checkout.liquid file.
-
- Click the checkout.liquid file to open it.
Step 2. Remove the code
After you locate the checkout.liquid file, complete one of the following options to remove the code:
Option A: Find and delete code
Complete the following steps to find and delete Attentive’s code from your site:
- Place your cursor in the checkout.liquid file.
- To find the code, press Command+F (Mac) or Control+F (Windows) on your keyboard.
- Enter head tag in the Find field to locate the beginning of the style tag.
- Highlight the code from <!-- Insert head tag --> to the last </style> tag. See the following image as an example:
- Press Delete on your keyboard.
- Enter <script in the Find field. It should locate both script tags.
- Highlight the code from <script to the last </script> tag. Note that there should be two <script> tags. See the following image as an example:
- Press Delete on your keyboard.
- Complete the following step, depending on whether you’ve installed the transactional, marketing, or both checkboxes:
Checkbox Step Example image Marketing only Enter Attentive Marketing in the Find field to locate the beginning of the code.
Click the image to expand it.Transactional only Enter Attentive Transactional in the Find field to locate the beginning of the code.
Click the image to expand it.Both Enter Attentive in the Find field to locate where both pieces of code appear.
Click the image to expand it. - Complete the following step, depending on whether you’ve installed the transactional, marketing, or both checkboxes:
Checkbox Step Example image Marketing only Highlight <!-- Attentive Marketing - insert HTML in body main__content section --> to the last </div> tag.
Click the image to expand it.Transactional only Highlight <!-- Attentive Transactional - insert HTML in body main__content section --> to the last </div> tag.
Click the image to expand it.Both Highlight the code starting with <!-- to the last </div> tag.
Make sure to include both the Attentive Marketing and Attentive Transactional pieces of code. The example image shows both pieces of code highlighted.
Click the image to expand it. - Press Delete on your keyboard.
- Click Save.
Your checkout.liquid file should now resemble the following:
Option B: Revert to an older version
Important! Please be aware that reverting to an older version could potentially remove any other code that was added to your checkout.liquid file. Consult your team to ensure that you’re not removing any additional code before reverting to an older version. |
Complete the following steps to revert to an older version to remove Attentive’s code from your site:
- Click Older versions next to the checkout.liquid file name, as shown in the following image.
- Select a version that does not include the Attentive code.
Note: If you only customized the checkout.liquid file once (with the Attentive code), we recommend that you use the Original version. - Click Save.
Your checkout.liquid file should now resemble the following:
Step 3. Confirm the code is removed
Now that you’ve completed the previous steps, confirm that the customized code for the Attentive checkout checkbox is removed:
- Place your cursor in the checkout.liquid file.
- To find the code, press Command+F (Mac) or Control+F (Windows) on your keyboard.
- Enter Attentive in the Find field. It should return no results.
Now that you’ve removed the Attentive checkout checkbox, you can follow the steps to set up transactional and marketing subscriber collection and messages.