How to Add simple tick box to checkout/cart?

How to Add simple tick box to checkout/cart?

OrionLee
Excursionist
24 1 0

I've read through a few posts asking about these, but am unsure how to do these for the Venture theme that we currently use on the store.

 

I want to add code like this to the checkout or the cart so people can opt in to be contacted about one of our products.  I did use some code off the UI elements generator, but where do I need to put this in our current theme?

Reply 1 (1)

OrionLee
Excursionist
24 1 0

This was the code I intended to add:

 

<p class="cart-attribute__field">
<input type="hidden" name="attributes[If you have purchased a challenge badge we'd love to get in touch about your experience of our challenge packs! Please click here if you agree to this.]" value="No">
<input type="checkbox" name="attributes[If you have purchased a challenge badge we'd love to get in touch about your experience of our challenge packs! Please click here if you agree to this.]" value="Yes"{% if cart.attributes["If you have purchased a challenge badge we'd love to get in touch about your experience of our challenge packs! Please click here if you agree to this."] == "Yes" %} checked{% endif %}>
<label>If you have purchased a challenge badge we'd love to get in touch about your experience of our challenge packs! Please click here if you agree to this.</label>
</p>