Hi PuaHome,
I have just implemented the terms and conditions checkbox to cart page of Dawn theme recently, by utilizing the section block feature. (Demo below)

Here’s the code which can copy paste below.
Go to your theme editor, go to the Sections folder, and Add a new snippet file named “cart-termsbox”
And paste this code into the file :
<p class="cart-attribute__field">
<input type="hidden" name="attributes[{{ block.settings.internal_label }}]" value="No" form="cart">
<input id="termsbox_id" {% if block.settings.mandatory %}class="required" required {% endif %} type="checkbox" name="attributes[{{ block.settings.internal_label }}]" value="Yes" {% if cart.attributes[block.settings.internal_label] != "No" %} checked{% endif %} form="cart">
<label for="termsbox_id" style="cursor: pointer;">
{{ block.settings.prelink_text }}
<a href="{{ block.settings.terms_page.url }}" target="_blank">{{ block.settings.link_text }}</a>
{{ block.settings.postlink_text }}
</label>
</p>
<style>
#termsbox_id {
transform: scale({{ block.settings.checkbox_scale }});
}
{% if block.settings.mandatory %}
#dynamic-checkout-cart, [name="checkout"][type="submit"] {
{% if cart.attributes[block.settings.internal_label] != "No" %}
pointer-events: auto;
opacity: 1.0;
{% else %}
pointer-events: none;
opacity: 0.5;
{% endif %}
}
{% endif %}
</style>
<script>
document.getElementById('termsbox_id').addEventListener('change', (event) => {
if (event.currentTarget.checked) {
document.getElementById("termsbox_id").value = "Agreed at " + (new Date()).toLocaleString();
{% if block.settings.mandatory %}
document.querySelector('[name="checkout"][type="submit"]').style.pointerEvents = 'auto';
document.querySelector('[name="checkout"][type="submit"]').style.opacity = 1.0;
document.getElementById('dynamic-checkout-cart').style.pointerEvents = 'auto';
document.getElementById('dynamic-checkout-cart').style.opacity = 1.0;
{% endif %}
} else {
{% if block.settings.mandatory %}
document.querySelector('[name="checkout"][type="submit"]').style.pointerEvents = 'none';
document.querySelector('[name="checkout"][type="submit"]').style.opacity = 0.5;
document.getElementById('dynamic-checkout-cart').style.pointerEvents = 'none';
document.getElementById('dynamic-checkout-cart').style.opacity = 0.5;
{% endif %}
}
})
</script>
Next, search for “main-cart-footer” file (located in sections/main-cart-footer), scroll to the bottom, and add the following code right before the { “type”: “@app” } part :
{
"type": "termsbox",
"name": "Termsbox",
"limit": 1,
"settings": [
{
"id": "prelink_text",
"type": "text",
"label": "Text before the link to the terms",
"default": "I have read"
},
{
"id": "link_text",
"type": "text",
"label": "The link text of the terms",
"default": "Terms and Conditions"
},
{
"id": "postlink_text",
"type": "text",
"label": "Text after the link to the terms",
"default": " and agree"
},
{
"id": "terms_page",
"type": "page",
"label": "Terms and Conditions page"
},
{
"type": "range",
"id": "checkbox_scale",
"min": 1,
"max": 3,
"step": 0.1,
"label": "Checkbox size",
"default": 1.2
},
{
"type": "checkbox",
"id": "mandatory",
"label": "Customer must check the checkbox to checkout",
"default": true
},
{
"id": "internal_label",
"type": "text",
"label": "Internal label that will be shown in the order's Additional Details",
"default": "Customer agreed to terms"
}
]
},
Then on the same file, you can add the following code, after the render block line that is below "when ‘@app’ ":
{%- when 'termsbox' -%}
<div {{ block.shopify_attributes }}>
{% render 'cart-termsbox' , block: block %}
</div>
Then after saving, you can go to your Shopify Admin, select the theme and click “Customize” , then navigate to the Cart page :
In the “Subtotal” sections on the left side bar, you can click “Add block”, and select “Terms box” (which is the snippet code you have added earlier) :
You can then edit the text for the checkbox, and click Save :
You would have to ensure customer can only checkout from the cart page, which means you have uncheck the “dynamic checkout button” on the product page in the Theme customize, and also change the “Cart type” to either “Popup” or “Page” in the Theme settings (the settings icon on left side bar in theme customize)
I have written a more detailed guide with screenshots on how to add this checkbox here : https://yagisoftware.com/articles/how-to-add-agree-to-terms-and-conditions-checkbox-in-shopify
Hope this can help!
Regards,
Axel Kee