Streamlining Shopify: How to Add a Required Terms & Conditions Checkbox to Specific Products
That's exactly the challenge offroadjim faced in the Shopify Community forums recently. They were using the Athens theme and needed to add a "terms-required checkbox" to about 50 products, all while keeping their Shopify built-in variants intact. It's a common dilemma, especially for stores selling custom, regulated, or high-value items where explicit customer agreement is crucial.
The community rallied with some fantastic insights, offering two main paths to tackle this: leveraging a dedicated app or diving into a bit of theme code customization. Let's break down what we learned.
The App Route: Simplicity and Scalability
One solid suggestion came from Easify-Jennifer, who highlighted how their Easify Custom Product Options app can handle this gracefully. The beauty of a dedicated app is that it often provides a user-friendly interface to create and manage these kinds of required fields without needing to touch a single line of code.
As Easify-Jennifer showed, you can create a new Checkbox option, enter your specific confirmation text (like “I confirm that I have read and agree to the terms and conditions”), and simply mark it as "Required."


The real time-saver here is the ability to apply this single option set to multiple products, either by manually selecting them or using product conditions (like tags) to automate it. This way, your existing variants for size, color, etc., remain untouched. It’s a fantastic option if you prefer a no-code solution and want to keep things simple.
The Code Customization Route: Precision and Control
Now, if you're comfortable with a little Liquid and JavaScript, the community offered a brilliant, robust code-based solution that offroadjim ultimately got working perfectly. This approach gives you granular control and avoids adding another app dependency. Moeed, ajaycodewiz, devcoders, and Custom-Cursor all pointed towards this method, emphasizing the use of product tags to target specific products.The core idea is to add a custom code block to your product template that only renders for products with a specific tag (e.g.,
terms-required). This code will display the checkbox, prevent the "Add to Cart" button from working until it's checked, and even record the acceptance on the order.Step-by-Step: Implementing the Code Solution
Let's walk through how ajaycodewiz's comprehensive solution works, which offroadjim confirmed was the key.- Tag Your Products:
First, you'll need to identify the 50 products that require this checkbox. In your Shopify admin, go to Products, select the relevant products, then click More actions > Add tags. Type a unique tag like
terms-required, click Add, then Save. This tag acts as the trigger for our code.

- Add a Custom Liquid Block to Your Product Template:
Navigate to your Shopify admin, go to Online Store > Themes. Find your current theme (like Athens, in offroadjim's case) and click Customize. Then, go to Product template > Product information. Click Add block and search for Custom liquid (or
Liquiddepending on your theme).
- Configure and Position the Block:
Set the Position of this new Custom liquid block to Right. Leave Heading and Icon empty to ensure it displays inline with your product details and buy buttons, rather than as an expandable accordion. Drag this block in the block list so it sits just above your Buy buttons block.

- Paste the Code:
In the Custom liquid block, paste the following code provided by ajaycodewiz. This code includes Liquid to check for the tag, HTML for the checkbox and error message, CSS for styling, and JavaScript to handle the validation and disable/enable the add-to-cart buttons.
{% if product.tags contains 'terms-required' %}Please accept the Terms and Conditions to continue.{% endif %}Remember to change the policy link (currently
/policies/terms-of-service) to your actual terms and conditions page. - Customize the Checkbox Text and Display Additional Terms:
offroadjim wanted the checkbox to say “I Agree With The Below Terms and Conditions” and then display the full terms directly below it. The provided code gives you the flexibility to do this. For the checkbox text, you'd edit the
I have read and agree to the Terms and Conditions.part. To display the additional terms, you can simply add a paragraph or awith your custom text right after the closingtag, within theterms-gatediv.So, to achieve offroadjim's desired display:

You'd adjust the HTML portion of the code like this (example):
By placing this order, I acknowledge that this item is custom-made to order and is non-returnable, non-exchangeable, and not eligible for store credit. All sales are final. Production time for this custom item is currently 10–12 business days. Once the order has been accepted into production, it cannot be cancelled. This product is excluded from our Free Shipping offer.
This allows you to customize both the checkbox label and the explanatory text directly below it.
- Verify Order Confirmation:
offroadjim also asked if the terms acceptance would show up on the order itself. ajaycodewiz confirmed that yes, it does come through on the order, in the same block as other product properties. Initially, it might read as "Terms accepted: Yes," but by editing the
name="properties[Terms accepted]"attribute in the input line to match your desired text, likename="properties[I Agree With The Below Terms and Conditions]", it will reflect that exact phrase on the order. This is super helpful for your internal records!
And here's how offroadjim confirmed it was working on their end:

This code-based solution is fantastic because it's lightweight, directly integrated into your theme, and uses Shopify's native tagging system for easy management across many products. It also specifically targets the "Add to Cart" and fast checkout buttons, ensuring compliance before purchase.
Ultimately, both the app-based and code-based solutions offer viable ways to add a required terms checkbox to specific products on your Shopify store without disrupting your variant setup. If you're not comfortable with code, an app can be a quick and easy win. But if you want maximum control and a lean, integrated solution, the custom Liquid and JavaScript approach, as perfected by offroadjim with the community's help, is a powerful way to go. Just remember to always test thoroughly on a duplicate theme before pushing changes live! - Verify Order Confirmation: