All Collections
Zapiet - Pickup + Delivery
Developers
Terms and conditions checkbox support
Terms and conditions checkbox support
Clemency Farmer avatar
Written by Clemency Farmer
Updated this week

If you have a terms and conditions checkbox on your shopping cart page, you may need to implement some additional code to support it.


Please reach out to us at [email protected]—we’ll be happy to implement this for you. Only proceed if you are comfortable editing code yourself.



Find the terms and conditions checkbox ID

  1. Go to Online Store > Themes and find the theme you will be editing.
    We advise creating a duplicate of your live theme, to avoid making any changes that may affect customers.

  2. Click Actions and select Edit Code.

  3. Find your main cart file (usually in Sections).
    It might be named differently, such as:

    • cart.liquid

    • cart-template.liquid

    • cart-footer.liquid

  4. Find the code snippet for your terms and conditions checkbox (usually placed above the checkout button).

  5. Find the ID for the checkbox, and make a note of its name—here it is named "agree".
    It might be named differently, such as:

    • Terms

    • Conditions

  6. If you can't find the ID, you may need to add it in.

    Find this code:

    type="checkbox"

    And replace it with :

    type="checkbox" id="terms"

Add checkbox support

The steps are different depending on your app version. Follow our guide to find out which version of the widget you are using.

Online Store 2.0

  1. Within Zapiet - Pickup + Delivery > Settings > Developers > Custom scripts, add the following code:

     window.customCheckoutValidation = function() {
    if ($("#terms").is(":checked")) {
    $("#cart_form").submit();
    return true;
    }
    alert("You must agree with the terms and conditions");
    return false;
    }

  2. If needed, change this code to match your theme.
    If the checkbox ID was not "terms", change the code above to match it.
    For example:

  3. Click Save.

Your terms and conditions checkbox should now be integrated with Zapiet - Pickup + Delivery. If your customers click checkout before agreeing to your T&C, they will see an alert notifying them to agree to the T&C conditions.

If this is not the case on your store, take a look at our troubleshooting section.


Version 7.1.2.

  1. Within your storepickup-addons.liquid file add the following code:

    <script type="text/javascript">   
    window.customCheckoutValidation = function() {
    if ($("#terms").is(":checked")) {
    $("#cart_form").submit();
    return true;
    }
    alert("You must agree with the terms and conditions");
    return false;
    }
    </script>

  2. If needed, change this code to match your theme.
    If the checkbox ID was not "terms", change the code above to match it.
    For example:

  3. Click Save.

Your terms and conditions checkbox should now be integrated with Zapiet - Pickup + Delivery. If your customers click checkout before agreeing to your T&C, they will see an alert notifying them to agree to the T&C conditions.

If this is not the case on your store, take a look at our troubleshooting section.


Troubleshooting

If the code is not working as expected, you can:

Please note that each theme is different and may need different steps.


Match the example code with your theme code

Repeat step #2 of add checkbox support to make sure the terms and conditions checkbox ID matches the code you have added to your store.


Add jquery

  1. Go to your main cart file.

  2. Add this code at the top:

    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

  3. Click Save.


Check the cart form

  1. Go to your main cart file.

  2. Find the ID for the cart form.
    It should be above the checkbox code, and begins with <form.

  3. Find the cart form ID and make a note of it—here it is "cart_form".

  4. Check if it is the same as in this code snippet:

  5. If it is different, change this code to match your theme file.
    Replace cart_form with the ID in your theme file.
    For example:

Did this answer your question?