Help with Order Status additional scripts

Help with Order Status additional scripts

1 0 0

Hi there! I added an optional checkbox to my store's Cart page by adding code to our theme.js and cart-template.liquid files (see below). Now I want to add an additional script to the Order Status so that the customers who checked the box get a special message. I've been looking through the posts about additional scripts and can't figure out what to put there. Any advice would be most welcome 🙂


Code I added to theme.js:

$(document).ready(function() {
$('body').on('click', '[name="checkout"], [name="goto_pp"], [name="goto_gc"]', function() {
if ($('#agree').is(':checked')) {


Code I added to cart-template.liquid:

<p style="float: none; clear: both; ">
<input style="float:none; vertical-align: middle;" type="checkbox" id="agree" />
<label style="display:inline; float:none" for="agree">I'm donating this toy to the <a href="/pages/hope-for-the-holidays-toy-drive">Hope For The Holidays Toy Drive</a>


For reference, my store uses the Debut theme (I know it's out of date, we just can't risk breaking the site with a new theme during the busiest shopping time of the year). 

Replies 0 (0)