Cart - Add an 'Agree to terms and conditions' checkbox

TyW
Community Manager
556 38 999

You can add an I agree with the terms and conditions checkbox to your cart page that customers must check before continuing to the checkout. If a customer doesn't check the checkbox before clicking the checkout button, an alert pop up will prevent them from continuing.

 

tc-01.jpg


Tip: It's not possible to add the checkbox to the checkout pages. It can be added only to the cart page that exists at http://www.your-shop-URL.com/cart.

The steps for this tutorial differ depending on whether you are using a sectioned or a non-sectioned theme. A sectioned theme is a newer theme that lets you drag and drop to arrange the layout of your store's pages.

To figure out whether your theme supports sections, go to the theme's Edit code page. If there are files in the Sections directory, you are using a sectioned theme. Non-sectioned themes were released before October 2016, and do not have files in the Sections directory.

If you are using a sectioned theme, then click the Sectioned themes button and follow the instructions. If you are using an older, non-sectioned theme, then click the Non-sectioned themes button and follow the instructions.

TyW | Online Community Manager @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

Replies 125 (125)
maison1
New Member
1 0 1

Hello Thank you for commenting on the article, it did not work for me also, I did follow your adjustments and was still not able to get the "required" portion to work out. Would you be able to assist me that? That would seriously be awesome thank you! 

olil
New Member
1 0 0

Hi, the info for the Brooklin theme does not match to the code.  Why is it so ?  I need a solution to this subject. I can not edit the code due to this problem.

dclopez
Tourist
6 0 1

Can you paste the 2 sections here?

dclopez
Tourist
6 0 1

Can you add the 2 sections here? 

kalobyte
New Member
2 0 2

Just want to say to all, if you are from Germany.

This tutorial is useless, because the ckeckbox appears on cart, but not on the last step of checkout.

I spend some hours to realize that I'am working on cart-template and this file is not the checkout page, on which I test it and refresh it like idiot.

 

Ckeckout page appears if the buyer clicks "buy now" button and goes thru many pages with forms.

And according to german laws this checkbox muss be near of the "complete order" button on the last step.

herjourney
Excursionist
19 1 1

Thanks! This worked great in my debut theme but I'm having an issue with adding it to the line above the checkout button. I tried adding a <p> and a <br>  right before the input tag but it doesn't seem to be working. 

 

<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>
<br>
<p></p>
</label> 


<input type="submit" name="checkout"
class="cart__submit btn btn--small-wide"
value="{{ 'cart.general.checkout' | t }}">
</div>

 

 

lewishughes
New Member
3 0 0

What if there is no theme.js or theme.js.liquid file and only a theme.min.js file?

 

Please can I have some assistance with this.

GARESIOVINI
Tourist
8 0 2

Hi, I followed the tutorial and everything is great, except for one thing. If I use internet explorer to reach the shop, in the shopping cart page the checkout button vanishes and doesn't work properly. The popup for consent doesn't come out and you can't finalize the payment

RuDu
New Member
1 0 0

Hi Kalobyte,

 

as i am intergrating the buy button in our wordpress page, could you tell me how you solved to implement this at the last page (complete order?)

 

Thanks a lot and greetings from germany

AlexS
Tourist
7 0 0

I am using the Venture theme and I had noticed this and changed it to required but you are still able to bypass the checkbox. Any other solutions to fixing this problem?

 

The logic makes sense it just doesn't want to work! So frustrating!