TTG CE2 Cart Checkboxes

Optionally, buyers may be presented with any number of checkboxes on checkout. Checkboxes may be configured within the settings.php file, under the heading CHECKBOXES. Example uses are for agreement to terms and conditions of sale, or to sign-up to receive newsletters. Checkboxes may be made optional or mandatory for checkout.

Check-boxes display on both the PayPal review page and the transactionless checkout page, as shown:

Checkout checkboxes

The format is: checkbox=PARAMETER_NAME|title=TITLE|required=[yes or no]|errormessage=ERRORMESSAGE

  • PARAMETER_NAME: a short name consisting only of letters, without spacing or punctuation. This name uniquely identifies the checkbox.
  • TITLE: the text that appears next to the checkbox, e.g. “I agree to the terms and conditions”
  • REQUIRED: whether this checkbox must be checked in order to complete the transaction.
  • ERRORMESSAGE: the message that appears should the user attempt to submit without checking a required checkbox. Only applies if required=yes is set for this checkbox.

Checkboxes can be linked to further information in two ways:

  1. Linked to text that appears over the current page. The link is set in the title, by using the format [[TEXT TO LINK]], e.g. I agree to the [[terms and conditions]]. The text to be linked should be placed in a file under config/terms/, with a name matching the PARAMETER_NAME, e.g. config/terms/taxes.txt for a checkbox with the PARAMETER_NAME of 'taxes'. (see picture below)
  2. Linked to an external web page that opens in another window or tab. The link is set in the title, by using the format [[TEXT TO LINK=URL]], e.g. [[click here=""]]

Terms and Conditions

Information thus linked may be formatted using Markdown syntax. For information on using Markdown syntax, see John Gruber's Markdown page at

An example checkbox that links to a pop-up with terms, pictured above. The contents of the pop-up can be found in config/terms/terms.txt:

checkbox=checkboxname=terms|title=I agree to the ''%%[[terms and conditions]]%%''|required=yes|errormessage=You must agree to the terms and conditions

An example checkbox that links the text “here” to an external page, in this case

checkbox=checkboxname=compliance|title=I will comply to all state laws specified ''%%[[here=]]%%''.|required=yes|errormessage=You must comply with all state laws

An example checkbox that is not required:

checkbox=checkboxname=mailinglist|title=Sign me up to the mailing list|required=no