Skip to main content

Overview

This tutorial shows you how to add a checkbox beneath the checkout button that requires customers to agree to your store’s terms and conditions. When unchecked, the checkout and express payment buttons are disabled. This is a great way to ensure legal compliance, set clear expectations, and add professionalism to your cart experience.

What this customization does

  • Adds a terms and conditions checkbox under the checkout button
  • Prevents customers from checking out until they agree
  • Works with both standard and express checkout buttons
  • Supports fully customizable text and link
This customization requires basic HTML, JavaScript, and CSS. It is best for store owners or developers with beginner coding knowledge.

Step 1: Add custom HTML

  1. Go to Upcart > Cart Editor > Settings > Custom HTML
  2. Paste the following in Above announcements/rewards:
Legacy note: window.upcartOnCartLoaded callbacks still work but are deprecated and log console warnings. Use upcartSubscribeCartLoaded for all new scripts.
  1. Paste the following in Below checkout button. Update the link and text to match your store’s terms:

Step 2: Add custom CSS

  1. Go to Upcart > Cart Editor > Settings > Custom CSS
  2. Paste the following to control styling:
You can change the colors to match your branding by updating color, background-color, and opacity values.

Final result

When customers open the cart:
  • Checkout and express buttons are disabled until the checkbox is ticked
  • A red warning message appears if they try to proceed without agreeing
  • Once the box is checked, all buttons become active

Need help?

For advanced implementations or more complex requirements, we recommend working with a Shopify Expert. Upcart’s support team does not assist with writing or troubleshooting custom code. See Shopify Experts