Ride Theme - Terms and Conditions not giving and error code when not selected

Topic summary

A user is implementing a Terms and Conditions checkbox for their store’s checkout process but encountering an issue where no error message displays when the checkbox remains unselected.

Technical Details:

  • Code has been added to the Theme-editor.js file in the assets folder
  • The implementation includes jQuery code that should trigger an alert when users attempt to checkout without agreeing to terms

Current Problem:

  • The validation is not working as expected—customers can proceed to checkout even without selecting the required checkbox
  • The error message “You must agree with the terms and conditions of sales to check out” fails to appear

Status: The issue remains unresolved with no responses or solutions provided yet. The posted code snippet appears incomplete or corrupted, which may be contributing to the malfunction.

Summarized with AI on November 19. AI used: claude-sonnet-4-5-20250929.

I have added the code (see below) for Terms and conditions, but it doesn’t give an error code when it isn’t selected.

In asset - Theme-editor.js

$(document).ready(function() {
$(‘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;
}
});
});