function uc_termsofservice_agreement_cart_callback in Ubercart Terms of Service 6
Same name and namespace in other branches
- 7 uc_termsofservice.module \uc_termsofservice_agreement_cart_callback()
Callback form for cart pane.
1 string reference to 'uc_termsofservice_agreement_cart_callback'
- uc_termsofservice_cart_pane in ./
uc_termsofservice.module - Implements hook_cart_pane().
File
- ./
uc_termsofservice.module, line 100 - Ubercart Terms of Service.
Code
function uc_termsofservice_agreement_cart_callback($items) {
if (module_exists('modalframe') && variable_get('uc_termsofservice_cart_popup', 0)) {
// If the modalframe module is enabled and the config for popups is
// then the ToS is shown in a popup.
modalframe_parent_js();
drupal_add_js(drupal_get_path('module', 'uc_termsofservice') . '/uc_termsofservice.js');
$node = uc_termsofservice_get_node('cart');
$width = variable_get('uc_termsofservice_cart_popup_width', 500);
$height = variable_get('uc_termsofservice_cart_popup_height', 300);
$form = uc_termsofservice_get_item('cart', $node->title, 'uc_termsofservice/show/' . $node->nid, "{$width},{$height}");
}
else {
$form = uc_termsofservice_general_form(array(), 'cart');
}
return $form;
}