Use an Agree to Terms Checkbox with Product Upsell


This is an unsupported theme customization. If you need help setting it up, Email our Support Wizards.

If you would like to use an "agree to terms" checkbox in your cart along with Product Upsell, follow these steps:

  1. From "Shopify Admin", select Online Store.

    select online store

  2. Select Actions.


  3. Select Edit code.

    Edit code

  4. Under "Layout", select theme.liquid.

    select theme.liquid

  5. Add this code above the </body> tag in the file: 
    function termCheck(){
     return true
     } else {
     return false
    $('[name="checkout"], input[name="goto_pp"], input[name="goto_gc"]').click(function() {
    alert("You must agree with the terms and conditions of sales to check out.");
    return false;

    add this code to the bottom of the file

  6. Select Save.

    select save

  7. From "Shopify Admin", select Apps.

    Select Apps

  8. Select Product Upsell.

    Select Product Upsell

  9. Select Settings.


  10. Select Upsell Settings.

    Upsell Settings

  11. Scroll down to the "Advanced Page Settings" section.

    scroll down to advanced page settings

  12. Under "Checkout Upsell Page", in the "Enter function to call before upsell" field enter: termCheck()

    enter the funtion

  13. Select Save.

    select save

That's it!

Next Steps:

Blog Posts: