I'm not an expert on panes but something like this should work.. (modify as needed for your module).
<?php
/**
* Implementation of hook_checkout_pane
*/
function uc_camp_checkout_pane() {
global $user;
$items = uc_cart_get_contents();
$containsCamp = FALSE;
foreach ($items AS $item) {
// Look for the word "camp" in the SKU, set var to TRUE if exists
if (eregi('camp', $item->model)) {
$containsCamp = TRUE;
}
}
if ($containsCamp == TRUE) {
$panes[] = array(
'id' => 'camp_pane',
'title' => t('Camp Pane'),
'desc' => t('Special camp pane description..'),
'callback' => 'camp_pane_callback',
'weight' => 7,
);
} else {
$panes[] = array(
// Put the alternate pane content here, different callback most likely...
}
return $panes;
}
// Callback for first Camp checkout pane
function camp_pane_callback($op, &$arg1, $arg2) {
switch ($op) {
case 'view':
$description = t('Some special Camp function Pane');
$contents['camp_pane'] = array(
'#type' => 'textfield',
'#title' => t('Camp Pane amount'),
'#description' => t(''),
'#default_value' => $arg1->campdiscount['amt'],
);
return array('description' => $description, 'contents' => $contents);
case 'process':
$arg1->campdiscount['amt'] = $arg2['campamt'];
return TRUE;
}
?>Depending on what you'll need to do you may end up hooking into the order process some more, such as for a discount, adding something to a user object (such as a Role) etc. Hope this helps.
NOTE this code is untested but should give you a place to start. 



Joined: 08/14/2007