Add an agree to terms and conditions checkbox - Not Working

New Member
2 0 0

Hello!

I followed the steps to get the checkbox working (https://help.shopify.com/themes/customization/cart/add-terms-and-conditions-checkbox), but it's not showing up on the front end.

I'm using the Launchpad-Star theme and did not follow the "Brooklyn Theme Tip", but was wondering if there are any missing steps.

Thanks in advance!!!

0 Likes
Shopify Staff
Shopify Staff
35 0 4

Hey kkmurphy,

I am Ryan from the Shopify Support team welcome to the forums. 

I have gone through the tutorial you provided with the Lauchpad-Star theme and was able to get the checkbox to work. You do not need to do any extra steps such as those for the Brooklyn theme. In step three I placed the code above this line in cart.liquid

{% if additional_checkout_buttons %} 

Also make sure there are no additional buttons in your cart page only the Checkout, Update cart and PayPal. 

I hope this helps!

Ryan 

Shopify Support

0 Likes
New Member
2 0 0

Hello Ryan,

Thanks for the quick reply. I added the code above the line you mentioned above, but still no luck.
My cart page is currently a slide-out popup. Is this the issue?

Thanks!

0 Likes
Shopify Staff
Shopify Staff
35 0 4

Hi Kkmurphy,

Yes this could be the issue. The checkbox will only appear on an actual page. Changing this in the Customize theme should make this work. 

I hope this helps!

Ryan 

Shopify Support

0 Likes
New Member
4 0 0

Hi Ryan, 

I have a similar issue using the Debut theme where the checkbox appears but the checkout button allows the user to progress regardless of whether or not they have ticked the box.  I have followed the tutorial however it does not exactly follow my theme.

I have included the first section of code in the theme.liquid file as below:

  <script>
    
$('body').on('click', '[name="checkout"], [name="goto_pp"], [name="goto_gc"]', function() {
  if ($('#agree').is(':checked')) {
    $(this).submit();
  }
  else {
    alert("You must agree with the terms and conditions of sales to check out.");
    return false;
  }
});
</script>
  
</body>

The tutorial then states to add the next section of code into the card.liquid file, however my cart.liquid file has the following:

{% comment %}
  The contents of the cart.liquid template can be found in /sections/cart-template.liquid
{% endcomment %}

{% section 'cart-template' %}

Therefore I have instead pasted the code into section cart-template.liquid as per the below:

            <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>.
                  </label>
            </p>
            
            <input type="submit" name="update" class="btn btn--secondary cart__update cart__update--large small--hide" value="{{ 'cart.general.update' | t }}">                     
            <input type="submit" name="checkout" class="btn btn--small-wide" value="{{ 'cart.general.checkout' | t }}">
            {% if additional_checkout_buttons %}

Can you offer any advice please?

I notice a couple of inconsistencies on the tutorial. In point 5 where the first set of code is being pasted the code listed differs to that in the screen print.  Also on the screen print where you can see the button code it differs to what exists in my theme in that it is using <button whereas mine is using <input.

Any help much appreciated, thanks!

0 Likes
New Member
2 0 0

I have the same issue with the Debut theme. I have the checkbox but you don't need to click it to proceed to checkout.

0 Likes
Shopify Expert
2660 63 662

Hi S!

The answer is here

Want to hire me to tweak a theme? Mail me at tairli@yahoo.com!
My post solved your problem? Like it!
0 Likes
Excursionist
33 0 5

Hi

I also followed the instructions in the shopify tutorial and can't get it to work.  I am currently using the brooklyn theme.  I followed all the instructions including the removal of additional check out buttons.  All that occurs is that when I try to check out it gives me a pop up window saying that I haven't agreed to the terms and conditions but there is no box to click for me to do that.  Appreciate any help.

Thank you!

0 Likes
Shopify Expert
2660 63 662

HI KJ,

You should share your storefront password (from Online Store->Preferences->Password Page) to get help. Otherwise we can only guess what's wrong with you theme.

Want to hire me to tweak a theme? Mail me at tairli@yahoo.com!
My post solved your problem? Like it!
0 Likes
Excursionist
33 0 5

Hey Tim,

Good point, my password is kaotre.  

0 Likes