Shopify - pay only $1 /pm for 3 months   GO!
Detect Shopify Theme

Or go to our Shopify Theme Detector directly

How to Add a Disclaimer Checkbox to your Shopify Store

Last modified: December 3, 2021

FAQ
How to Add a Disclaimer Checkbox to your Shopify Store
Shopify Trial

There are times when you might want to add a disclaimer to your website for products/services where there are certain things you cannot guarantee. For instance, if you sell a product where there might be a high variance or the customer might not be able to get the exact one that is the picture, you need to ensure that they understand this.

Just saying that there can be differences between the one on the screen and the one delivered is okay, but not all customers read everything on a page. By adding a checkbox on the checkout/cart page allows you to ensure that the customer has read this and understands it.

By default, there is not this function within the Shopify environment. There are other options for the GDPR and California Privacy Act. But if you want to make sure that the customer understands a disclaimer or is over a certain age, you need to get more creative with your website.

However, there are some Shopify themes that do have this option. But there are also other ways that you can do this. Here are some of those options.

Adding a Disclaimer Checkbox with a Sectioned Theme

If you’ve got a sectioned theme, then use this process to add a disclaimer to your checkout.

Step 1 – Log In

Log into your website with your user credentials.

Step 2 – Themes

Click on the ‘Online Store’ option and then select the ‘Themes’ option before choosing the theme that your store is currently using.

Adding a Disclaimer Checkbox with a Sectioned Theme

Click on the ‘Actions’ option and then click on the edit code. Within the ‘Assets’ area, you want to click on the option that reads ‘theme.js’ or ‘theme.js.liquid’.

Step 4 – Add Code

Then you can go down to the bottom of the page and add this code:

$(document).ready(function() {
$('body').on('click', '[name="checkout"], [name="goto_pp"], [name="goto_gc"]', function() {
if ($('#agree').is(':checked')) {
$(this).submit();
}
else {
alert("You must agree with the terms and conditions of sales to check out.");
return false;
}
});
});

Step 5 – Save

Then you click on the ‘Save’ button.

Step 6 – Sections

Then you need to click on the ‘Sections’ option and then click on the ‘cart-template.liquid’. This might be labeled as ‘cart.liquid’ or ‘cart-template.liquid’ in templates. Then look for the following code:

<button type="submit" name="checkout" class="btn">{{ 'cart.general.checkout' | t }}</button>

You need to paste this code in near this.

<p style="float: none; text-align: right; clear: both; margin: 10px 0;">
<input style="float:none; vertical-align: middle;" type="checkbox" id="agree" />
<label style="display:inline; float:none" for="agree">
I agree with the <a href="/pages/terms-and-conditions">terms and conditions</a>.
</label>
</p>

You can change the URL for the terms and conditions page to your specific terms and conditions page. Then you can click ‘Save’ and you’re done.

Final Word: How to Add a Disclaimer Checkbox to your Shopify Store

Above are the options to add a disclaimer box to your cart/checkout on your website. If you’re not used to working with code, you can also use an app. The Product Warnings app is a great option for those new to Shopify.

Got Something To Say?

Your email address will not be published. Required fields are marked *