Legal aspects checkout pane


Compatible with Ubercart 1.0!
Module to add a pane for agreeing terms and conditions and/or revocation rights using a checkbox. Supports file download, print view, page view and iframe view. All options can be activated/deactivated at store administration. See the attached screenshots to see how the pane looks like.

It is highly recommended to use this module in european shops.

German: Das Modul blendet auf Wunsch im Bestellprozess die AGB und das Widerrufsrecht ein, sodass diese vom Benutzer bestätigt werden müssen.

- Configurable via store administration (admin/store/settings/checkout/edit/legal)
- GTCT/RR could be displayed directly in pane
- Provides print-links
- Provides download-links
- Provides page view of GTCT at path '/gtct'
- Provides page view of RR at path '/revocation'
- Provides input formats
- Provides file upload
- Some theme functions
- I18n-Support
- Translation in German, Dutch


Initially released as uc_gtct with keesje
Dutch translation by Fred Klopper

- Better theming support
- Possibility to retrieve text from a standard drupal node, see here
- Multilanguage bug, see
- Ability to create unlimited panes (or sub panes), each with is own rules on when to display, see here
- Cleanup code
- Correction of my english (always do that please Smiling )

04.09.2008: Release Version 1.91
25.08.2008: Release Version 1.9
24.07.2008: Release Version 1.8
13.03.2008: Release Version 1.7
For more information see changelog.txt in the module

legalaspectspane-all-features.pnglegalaspectspane-all-features.png9.38 KB
legalaspectspane-no-features.pnglegalaspectspane-no-features.png3.54 KB
legalaspectspane-all-features_german.pnglegalaspectspane-all-features_german.png19.32 KB
uc_legalaspects_v18.tar48 KB
uc_legalaspects_v19.tar58.5 KB
uc_legalaspects_v191.tar59.5 KB
stephthegeek's picture
Joined: 10/20/2007
Juice: 575
"n/a" displays for anon users

In the legal aspects pane, it works fine for logged in users but anonymous gets "n/a" displayed in the box. Any ideas?

tom-d's picture
Bug Finder
Joined: 11/21/2007
Juice: 107
Re: "n/a" displays for anon users

this module seems to be broken for Ubercart 5.x-1.0-rc4, as stephthegeek mentioned with the module displaying "n/a" for anonymous users

mcneelycorp's picture
Joined: 10/26/2007
Juice: 72
Re: "n/a" displays for anon users

I have not seen the module but my guess is the "user access" within hook_menu() is not set right.

Elvis McNeely
Blogging about Drupal and web development:
Offering Drupal, eCommerce and Web services:

icouto's picture
Joined: 06/08/2008
Juice: 2
Has development of this stopped?

If so, that is a real pity! This is a sorely needed addition to Ãœbercart, as every shop I've setup has had to somehow ensure their clients legally accept their terms of service.

If someone is willing to update and re-release this, apart from the necessary bug-fixes, I would ask for the following modification to be considered: rather than having to upload a file with terms and conditions, I would rather have a the module retrieve the text from a standard drupal NODE - that is, the user simply specifies which node or URL alias has the Terms and Conditions. This may also make the whole code, as well as the admin interface, simpler.

Many thanks in advance for any updates and continuing support to this module! Smiling's picture
Bug Finder
Joined: 01/02/2008
Juice: 290
Thank you!!!

I was referred to this module by psynaptic, after paypal cut off one of my clients, seems paypal pro uk requires that users opt into a privacy policy. I expect this may be true of other gateways so this module is a MUCH needed addition. The client was running an old version of ubercart (security patched by hand) so we did not hit the bugs mentioned.

I somewhat agree with icouto, that there should be an option to get the text from a node, perhaps integrating with the legal module. I would also say the text "General terms and conditions" should be modifiable from the admin interface. Future developments could be being able to create unlimited panes (or sub panes), each with is own rules on when to display e.g. they may need to confirm they accept the privacy statement for all purchases but some items may require them to also confirm they are over 21 years old etc...

I will try to build in some time (and budget) to my next project to create some of these changes, also if anyone is willing to chip in money to a reverse bounty for new features, please say so. I think this module, with a little work could and should be part of core.

a_c_m's picture
Joined: 06/05/2008
Juice: 49
adapt to ubercart 1.0

hi folks,
i´m also a newby ubercart user with no php experince - and i´m also germany based so i was happy to find this contrib. now my question is there any chance that somone push it to a stabel version for ubercart 1.0 (the today actual version). and secon question - anybody out there who would make it integrate with i18 multilanguage support ?
i´m realy in urgent need of a solution as german law for online shops drives me sometimes cracy.
hope to get an answer from you folks out ther !

michels's picture
Uber DonorBug FinderInternationalizationizer
Joined: 08/12/2007
Juice: 205
New version 1.8

Back again Smiling
I released the new version 1.8 which is fully compatible with Ubercart 1.0 and should fix the most occured problems.

If you get an n/a error, your user needs the "access content" permission.

a_c_m and icouto I like your ideas and put it into the todo-list.

If you have problems or questions to the module, please contact me via PM or my contact form, because it seems that I don't get any email-notification if someone posts a new question in this thread..

michels's picture
Uber DonorBug FinderInternationalizationizer
Joined: 08/12/2007
Juice: 205
Version 1.9

I made a small update:
- Dutch translation-file from Fred Klopper (Thanks!)
- n/a Bug fixed

michels's picture
Uber DonorBug FinderInternationalizationizer
Joined: 08/12/2007
Juice: 205
Version 1.91

Some bugfixes.

Thanks to
senior-strongo and fredklopper2

cha0s's picture
Getting busy with the Ubercode.
Joined: 08/22/2008
Juice: 416
Coder compliance

Your module fails the coder tests with many errors because you used tabs instead of 2 spaces to indent. I converted the module using

cat uc_legalaspects.module | sed "s/\t/ /" > uc_legalaspects.module

Now it passes the tests just fine. You can get it here:

EDIT: Oops, sorry. I guess you couldn't download that .module because of my .htaccess blocking it...

drupal4normi's picture
Joined: 01/07/2009
Juice: 20
Is this module also available for Drupal 6.8 and UC 2?

is this kind of module also available for Drupal 6.8 and UC 2?

cedarm's picture
Bug FinderGetting busy with the Ubercode.
Joined: 08/29/2008
Juice: 100
Drupal 6, UC 2 port

Here's a Drupal 6 / UC 2 port based on version 1.91. I'm calling it 6.x-2.0-beta1. Because I have no need for the file upload/download feature I did not port that part and commented it out. Some testing done.

UPDATE: 2009-04-29
6.x-2.0-beta2 Added ability to override URLs for popup links.

uc_legalaspects-6.x-2.0-beta1.tar.gz 9.92 KB
uc_legalaspects-6.x-2.0-beta2.tar.gz 10.25 KB
smallwolf's picture
Joined: 09/07/2009
Juice: 2
Limiting to a specific product class

I'm trying this module out on a development site but I'm finding I don't need this for every product in my store. Is there a setting I'm missing somewhere or a snippet to limit this to a specific product class?

cedarm's picture
Bug FinderGetting busy with the Ubercode.
Joined: 08/29/2008
Juice: 100

Sorry, unless my memory fails me there is not an option. Feel free to patch the code and submit it back here.

Probably you just need to modify uc_checkout_pane_gtct() in op view, and inspect $arg1->products ($arg1 is the order object). If the products don't meet your requirement, then just return array(). You could probably hack in a three or five liner for your purposes, but we'd all like it if a configuration option was added to uc_legalaspects_form()... Smiling

jmuessig's picture
Joined: 12/03/2009
Juice: 37
an idea for the future

First off, great module! This is definitely a necessity for most businesses.

One thought for future development, should there be any, would be to allow the GTC checkbox to be included with the cart, so that users of Paypal express checkout would not be able to bypass the checking of the global terms and conditions.

Thanks for the great contribution!

jmuessig's picture
Joined: 12/03/2009
Juice: 37
another idea

A really cool feature would be to log critical details (i.e. date/time/IP) of the person clicking "I agree" and maybe associate that with a sales that in the future, one would have some proof to offer that the a specific person indeed clicked the I agree checkbox.

mea's picture
Joined: 01/03/2010
Juice: 2

Hi, great module, thanks for your work. I can't figure out how to translate the strings though. Searching in the translate interface doesn't find them. I refreshed strings before searching. Any idea what to do?

[EDIT] Sorry, it is there now, I don't know what the problem was.

homer jay's picture
Joined: 01/06/2010
Juice: 16
Problems with Popup window

i get your module which a great and simple way to fulfill the legal aspect during the checkout process, but unfortunately I do not get run the script to make a new or popup window for the aspect. I checked the option by configuration, and a also alredy try to change the uc_legalaspects.module file adding a "_blank" code to the link -> but still nothing.
Have someone idea how can it be??

will be appreciate for any advice, maybe some one had already such a "pain in the a..."

cjscullyca's picture
Joined: 06/17/2009
Juice: 71
Display conditionally?

Is there any way to display the terms and conditions only when certain products are purchased? For example, if someone purchases a book or video they don't need to agree to the ToS (or maybe the ToS is different) but if they buy a monthly membership the ToS is required?

mkmk's picture
Joined: 05/10/2010
Juice: 37
Make them optional ?

First, this is a great module. It improves over the work at by enabling popups that are themed.

it would be nice if the global terms and conditions and the revocation rights where both optional. Meaning, we could select to require only one of the two (and the other one would not be visible at all).

It would also be nice if we could manually set the names for "global terms and conditions". For example, for my website that might be "End User License Agreement" or "Legal" or "Privacy Policy" or something else.

mkmk's picture
Joined: 05/10/2010
Juice: 37
Re: Make them optional ?

Oh, whoops. it seems that unchecking the "Show required Checkbox" removes one of these options from the pane...

ocassoc's picture
Joined: 08/24/2009
Juice: 24
ToS Text vary by product or product class

Has anyone modified the code to display different Terms and Conditions text depending on the product, catalog, or product class? We have registrations for events for different sponsors, hence different terms and conditions.

gupa's picture
Joined: 06/04/2009
Juice: 42
Re: Legal aspects checkout pane

Is it possible to get the "Legal aspects" texts (GTCT and Revocationrights) in the mail template for the customers (

gupa's picture
Joined: 06/04/2009
Juice: 42
Re: Re: Legal aspects checkout pane

Yeah I got it! write me if you need the code, ....

gupa's picture
Joined: 06/04/2009
Juice: 42
here is it: put this in your

here is it:

put this in your template.php (/sites/all/themes/YOURTHEME)

perhaps you have to rename the functions to your theme name:

//display AGB in email

function zen_classic_uc_legalaspects_display_gtct_email() {

$ersatz_gtct = '';
$pattern_ucgtct_email = '/<body[^>]*>/';
$pattern_ucgtct_emailtitle = '/(\<title)(.*?)(title>)/';
$pattern_ucgtct_emailbodyend = '/<\/body[^>]*>/';
$ldgtct = theme('uc_legalaspects_display_gtct_print_view', variable_get('uc_gtct_term_conditions_text', 'not set'));
$ldgtct = preg_replace($pattern_ucgtct_email,$replacedhtml, $ldgtct);
  $ldgtct = preg_replace($pattern_ucgtct_emailtitle,$replacedhtml, $ldgtct);
$ldgtct = preg_replace($pattern_ucgtct_emailbodyend,$replacedhtml, $ldgtct);

  $output = '<h2>'. t('General terms and conditions') .'</h2><p>';
  $output .= $ldgtct;
  $output .= '</p>';
  return $output;

function zen_classic_uc_legalaspects_display_grp_email() {
$ersatz_grp = '';
$pattern_ucgrp_email = '/<body[^>]*>/';
$pattern_ucgrp_emailtitle = '/(\<title)(.*?)(title>)/';
$pattern_ucgrp_emailbodyend = '/<\/body[^>]*>/';
  $ldgrp = theme('uc_legalaspects_display_grp_print_view', variable_get('uc_grp_term_conditions_text', 'not set')); 
  $ldgrp = preg_replace($pattern_ucgrp_email,$ersatz_grp, $ldgrp);
    $ldgrp = preg_replace($pattern_ucgrp_emailtitle,$ersatz_grp, $ldgrp);
    $ldgrp = preg_replace($pattern_ucgrp_emailbodyend,$ersatz_grp, $ldgrp);
  $output = '<h2>'. t('Revocation rights') .'</h2><p>';
  $output .= $ldgrp;
  $output .= '</p>';
  return $output;

put this in your mail-template (/sites/all/modules/ubercart/uc_order/templates/) where you want to appear it:

   <hr noshade="noshade" size="1" /><br/>
  <?php print zen_classic_uc_legalaspects_display_grp_email() ?>

   <hr noshade="noshade" size="1" /><br />
   <?php print zen_classic_uc_legalaspects_display_gtct_email(); ?>

sorry i think there could be another better way, but it it works for me...


Donate via Paypal