Skip to main content
All CollectionsDevelopers
Terms and conditions checkbox support
Terms and conditions checkbox support
Jelizaveta avatar
Written by Jelizaveta
Updated over a week ago

If you have a terms and conditions checkbox on your shopping cart page, you may need to implement additional code for it to work with Zapiet - Pickup + Delivery.

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.


Terms and conditions checkbox ID

We advise creating a duplicate of your live theme, to avoid making any changes that may affect customers.

  1. Click Online Store, then Themes to find the theme you will be editing.

  2. Click ... and then Edit Code.

  3. In Sections folder, find your main cart file.
    The file 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 will need to add it in.

    • Find this code: type="checkbox"

    • And replace it with: type="checkbox" id="agree"


Add checkbox support

These steps apply only to the Zapiet - Pickup + Delivery widget version 1 or 2. Which version of the widget am I using?

If you're on a legacy version, please reach out to us on chat, and we would be happy to update the widget to the newest version for you!

  1. In Zapiet - Pickup + Delivery, click Settings then Developers.

  2. Add the following code to the Custom scripts section.

    window.customCheckoutValidation = function(params, callback) {
    var input = document.querySelector("#agree");

    if (input && !input.checked) {
    alert("You must agree with the terms and conditions");
    callback(false);
    return;
    }

    callback(true);
    }

  3. 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:

  4. Click Save.

Your terms and conditions checkbox should now be integrated with Zapiet - Pickup + Delivery.

If your customers click checkout before agreeing with your terms and conditions, they will see an alert notifying them to agree with the terms and 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 the code below at the top of the file.

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

  3. Click Save.

If you're still experiencing issues, please contact us on chat and we would be happy to help!

Did this answer your question?