This is an old revision of the document!

TTG CE2 Cart Checkboxes

Optionally, buyers may be presented with any number of checkboxes on checkout. These check-boxes may be optional or mandatory, and may serve purposes such as forcing buyers to agree to terms of purchase, or opting in for a mailing list.

Checkboxes may be configured within the settings.php file, under the heading CHECKBOXES.

Checkboxes will appear on checkout, pictured below.

Checkout checkboxes

Check-boxes configured here will display on both the PayPal review page and the transactionless checkout page. Example uses are for agreement to terms and conditions of sale, or to sign-up to receive newsletters. Check-boxes may be made optional or mandatory for checkout. 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' 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. //" Information thus linked may be formatted using Markdown syntax. For information on using Markdown syntax, see John Gruber's Markdown page at Examples follow. Remove the starting ”” below to activate the checkboxes.

An example checkbox that links to a pop-up with terms. 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 //|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