How do I set up my checkout Opt-In (Shopify Plus)?

As a Shopify Plus account, you can customize an opt-in checkbox that appears at checkout and adds another layer of compliance for your store!

To set up the checkout, you will first need to request access to "Checkout Liquid" from your Shopify Plus MSM.

Once you have been given access, select the Online Store tab in your Shopify Account.

 

1-Apr-02-2021-05-09-23-49-PM

 

Then select Actions > Edit Code.

 

2-Apr-02-2021-05-09-22-42-PM

 

Choose Checkout Liquid and scroll to the end of the current code.

 

3-1

 

Paste the following code snippet into the line above the closing </html> tag:

 

4-1

<script>
$(document).ready(function() {
if (Shopify.Checkout.step === 'contact_information') {
if($("#checkout_accept_sms").length<1){
$('<div class="fieldset">\
<div class="checkbox-wrapper" style="padding-top: 6px;padding-bottom: 0px;padding-left: 6px;">\
<div class="checkbox__input">\
<input id="checkout_attributes" type="hidden" name="checkout[attributes][smsOptIn]" value="SMS:False">\
<input class="input-checkbox" type="checkbox" value="1" id="checkout_accept_sms">\
</div>\
<label class="checkbox__label" for="checkout_accept_sms">\
By checking this box I consent to receive human support, offers, personalized recommendations and more by recurring text message. Message and data rates may apply. Text STOP to opt out at any time. Your consent to receive texts is not a condition of any purchase. Privacy & Terms available on our website.</label>\
</div>\
</div>').insertAfter($(".section--shipping-address").eq(0));
$("#checkout_accept_sms").on("change",function(){
var cn = $("#checkout_attributes").val();
cn = cn.replace(/SMS:(True|False)/gi, "");
cn += $(this).prop('checked') ? "SMS:True" : "SMS:False";
$("#checkout_attributes").val(cn);
});
}
}
});
</script>

 

Then tap Save!

 

5-1

Your checkout flow will now have a checkbox with opt-in messaging!

6-2

 

Need support? We’re happy to help! Please contact us directly at support@tonemessaging.com