Can anyone offer advice on obtaining tracking information for when a second or more people are signed up how to see who paid for them?
It appears the database does not record the order associated with the subsequent orders.
To explain here is the scenario:
Authenticated UserA signs up for their self and Anonymous UserB and pays successfully.
Signup records both Users as attendees.
If I view UserA I can see their associated order in their accounts section, their invoice will state 2 items purchased ( no recording here of who they paid for).
If I view AnonymousUserB who now has an account thanks to Drupal I can see they don't have any orders so I don't know who paid for them?

This is not a major issue just we'd like to see who paid for who for testing and refund scenarios (yes we could ask the attendee who paid for them if refund is needed on the rare occassion).

Thanks

Using
Drupal 6.19 (6.22 avail I know) Ubercart 6.x 2-4 Signup 6.x 1.0 rc6 Signup Int..UC 6.x 1.0 beta 6

CommentFileSizeAuthor
#2 Signup_Views.jpg44.39 KBOvation1357

Comments

technikh’s picture

Version: 6.x-1.0-beta6 » 6.x-1.0-rc3

In the latest version, this information is available. In views add the relationship "Associated Order" in Signup category. Then add necessary order fields in the display.

Ovation1357’s picture

StatusFileSize
new44.39 KB

I'm making use of the Associated Order views field and have been for quite a while now in the -dev branch of uc_signup.

Below is an 'enhanced' version of one of the stock admin views that you get with uc_signup. It will let you see all signup enbled content on your site with details including order numbers.. (N.B. You'll need the http://drupal.org/project/views_customfield module for it to work)

Because the main Signup module knows nothing about the concept of payment, uc_signup uses a bit of a nasty kludge whereby an anonymous signup is created as a placeholder with a duff email address (placeholder-@example.com) until payment is received.
In my case, we accept cheque/bank transfers which are obviously not an instant payment, so I had to create a view which would show the real username of these kludged users as well.
I made this view when I was very new to drupal and looking at my custom php, I could have simply used user_load() instead of querying the database, but it achieves the purpose.

Please see attached screenshot.... Maybe this will be useful to some folks...

$view = new view;
$view->name = 'signup_user_vbo_admin_list_demo';
$view->description = 'Per-node signup administration interface with checkboxes for bulk operations.';
$view->tag = 'Signup';
$view->view_php = '';
$view->base_table = 'signup_log';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('relationships', array(
  'nid' => array(
    'label' => 'Signup node',
    'required' => 1,
    'id' => 'nid',
    'table' => 'signup_log',
    'field' => 'nid',
    'relationship' => 'none',
  ),
  'uid' => array(
    'label' => 'Signup user',
    'required' => 1,
    'id' => 'uid',
    'table' => 'signup_log',
    'field' => 'uid',
    'relationship' => 'none',
  ),
));
$handler->override_option('fields', array(
  'nid' => array(
    'label' => 'Nid',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'link_to_node' => 0,
    'exclude' => 1,
    'id' => 'nid',
    'table' => 'node',
    'field' => 'nid',
    'relationship' => 'nid',
  ),
  'close_signup_limit' => array(
    'label' => 'Signup Limit',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'exclude' => 1,
    'id' => 'close_signup_limit',
    'table' => 'signup',
    'field' => 'close_signup_limit',
    'relationship' => 'nid',
  ),
  'type' => array(
    'label' => '',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'link_to_node' => 0,
    'machine_name' => 0,
    'exclude' => 1,
    'id' => 'type',
    'table' => 'node',
    'field' => 'type',
    'relationship' => 'nid',
    'override' => array(
      'button' => 'Override',
    ),
  ),
  'phpcode' => array(
    'label' => 'Remaining Spaces',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'value' => '<?php
$used = db_result(db_query("SELECT SUM(count_towards_limit) FROM {signup_log} WHERE nid = %d", $data->signup_log_nid));
if ( $used == NULL ) { $used = 0; }
//$avail = db_result(db_query("SELECT close_signup_limit FROM {signup} WHERE nid = %d", $data->nid));
$result = ($data->node_signup_log__signup_close_signup_limit - $used);
print_r($result);
?>',
    'exclude' => 1,
    'id' => 'phpcode',
    'table' => 'customfield',
    'field' => 'phpcode',
    'relationship' => 'none',
    'override' => array(
      'button' => 'Override',
    ),
  ),
  'name' => array(
    'label' => 'Username (\'Unregistered\' = Payment Pending)',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'link_to_user' => 1,
    'overwrite_anonymous' => 0,
    'anonymous_text' => '',
    'exclude' => 1,
    'id' => 'name',
    'table' => 'users',
    'field' => 'name',
    'relationship' => 'uid',
    'override' => array(
      'button' => 'Override',
    ),
  ),
  'value_2' => array(
    'label' => 'Personal Information: Title',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'link_to_user' => 1,
    'exclude' => 1,
    'id' => 'value_2',
    'table' => 'profile_values_profile_name_title',
    'field' => 'value',
    'relationship' => 'uid',
    'override' => array(
      'button' => 'Override',
    ),
  ),
  'value' => array(
    'label' => 'Personal Information: First Name',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'link_to_user' => 1,
    'exclude' => 1,
    'id' => 'value',
    'table' => 'profile_values_profile_first_name',
    'field' => 'value',
    'relationship' => 'uid',
    'override' => array(
      'button' => 'Override',
    ),
  ),
  'value_1' => array(
    'label' => 'Personal Information: Last Name',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'link_to_user' => 1,
    'exclude' => 1,
    'id' => 'value_1',
    'table' => 'profile_values_profile_last_name',
    'field' => 'value',
    'relationship' => 'uid',
    'override' => array(
      'button' => 'Override',
    ),
  ),
  'phpcode_1' => array(
    'label' => 'User Identity',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'value' => '<?php
if ( $data->users_signup_log_uid == 0 ) { 
$realuid = intval(db_result(db_query("SELECT uid FROM {uc_signup_log} WHERE sid = %d", $data->sid)));

if ( $realuid > 0 ) {
$fname = db_result(db_query("SELECT profile_values.value FROM profile_fields INNER JOIN profile_values ON profile_fields.fid=profile_values.fid  WHERE profile_fields.name = \'profile_first_name\' AND uid = %d", $realuid));
$lname = db_result(db_query("SELECT profile_values.value FROM profile_fields INNER JOIN profile_values ON profile_fields.fid=profile_values.fid  WHERE profile_fields.name = \'profile_last_name\' AND uid = %d", $realuid));

$fullname = $fname . " " . $lname;
if (preg_match(\'/^\\s*$/\',$fullname)) { 
print_r("<strong style=\'color:red !important\'>User No Longer Exists!</strong>"); }
else {
print_r("Payment Pending  ( <a href=\'/user/" . $realuid . "\' title=\'View User Profile\'>" . $fullname . "</a>)");  }
  }
}
else {
print_r("<a href=\'/user/" . $data->users_signup_log_uid . "\' title=\'View User Profile\'>" . $data->users_signup_log_profile_values_profile_first_name_value . " ". $data->users_signup_log_profile_values_profile_last_name_value . "</a>");
}
?>',
    'exclude' => 0,
    'id' => 'phpcode_1',
    'table' => 'customfield',
    'field' => 'phpcode',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
  ),
  'signup_time' => array(
    'label' => 'Signup time',
    'date_format' => 'small',
    'custom_date_format' => '',
    'exclude' => 0,
    'id' => 'signup_time',
    'table' => 'signup_log',
    'field' => 'signup_time',
    'relationship' => 'none',
  ),
  'attended' => array(
    'label' => 'Attendance',
    'exclude' => 0,
    'id' => 'attended',
    'table' => 'signup_log',
    'field' => 'attended',
    'relationship' => 'none',
  ),
  'edit_link' => array(
    'label' => 'Operations',
    'text' => '',
    'exclude' => 0,
    'id' => 'edit_link',
    'table' => 'signup_log',
    'field' => 'edit_link',
    'relationship' => 'none',
  ),
  'field_c_sched_date_value' => array(
    'label' => 'Course Date(s)',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'link_to_node' => 0,
    'label_type' => 'custom',
    'format' => 'long',
    'multiple' => array(
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_to' => '',
      'group' => '',
    ),
    'repeat' => array(
      'show_repeat_rule' => '',
    ),
    'fromto' => array(
      'fromto' => 'both',
    ),
    'exclude' => 0,
    'id' => 'field_c_sched_date_value',
    'table' => 'node_data_field_c_sched_date',
    'field' => 'field_c_sched_date_value',
    'relationship' => 'nid',
  ),
  'title' => array(
    'label' => 'Course/Package',
    'alter' => array(
      'alter_text' => 1,
      'text' => '[title] - [type] - [id:[nid]] - Spaces Left( [phpcode] / [close_signup_limit] )',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'link_to_node' => 1,
    'exclude' => 1,
    'id' => 'title',
    'table' => 'node',
    'field' => 'title',
    'relationship' => 'nid',
    'override' => array(
      'button' => 'Override',
    ),
  ),
  'oid' => array(
    'label' => 'Order#',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'exclude' => 0,
    'id' => 'oid',
    'table' => 'uc_signup_log',
    'field' => 'oid',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
  ),
  'status' => array(
    'label' => 'User: status',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'exclude' => 0,
    'id' => 'status',
    'table' => 'signup_log',
    'field' => 'status',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
  ),
));
$handler->override_option('arguments', array(
  'nid' => array(
    'default_action' => 'ignore',
    'style_plugin' => 'default_summary',
    'style_options' => array(),
    'wildcard' => 'all',
    'wildcard_substitution' => 'All',
    'title' => '',
    'breadcrumb' => '',
    'default_argument_type' => 'fixed',
    'default_argument' => '',
    'validate_type' => 'signup_status',
    'validate_fail' => 'not found',
    'break_phrase' => 0,
    'not' => 0,
    'id' => 'nid',
    'table' => 'node',
    'field' => 'nid',
    'relationship' => 'nid',
    'default_options_div_prefix' => '',
    'default_argument_user' => 0,
    'default_argument_fixed' => '',
    'default_argument_php' => '',
    'validate_argument_node_access' => 0,
    'validate_argument_nid_type' => 'nid',
    'validate_argument_vocabulary' => array(
      '1' => 0,
      '2' => 0,
    ),
    'validate_argument_type' => 'tid',
    'validate_argument_signup_status' => 'any',
    'validate_argument_signup_node_access' => 0,
    'validate_argument_php' => '',
    'validate_user_argument_type' => 'uid',
    'validate_user_roles' => array(
      '2' => 0,
      '7' => 0,
      '8' => 0,
      '5' => 0,
      '6' => 0,
      '4' => 0,
      '9' => 0,
      '3' => 0,
    ),
    'validate_argument_node_flag_name' => '*relationship*',
    'validate_argument_node_flag_test' => 'flaggable',
    'validate_argument_node_flag_id_type' => 'id',
    'validate_argument_user_flag_name' => '*relationship*',
    'validate_argument_user_flag_test' => 'flaggable',
    'validate_argument_user_flag_id_type' => 'id',
    'validate_argument_node_type' => array(
      'certificate' => 0,
      'poll' => 0,
      'product' => 0,
      'scheduled_course' => 0,
      'printed_documents' => 0,
      'scheduled_package' => 0,
      'content_scheduled_private_course' => 0,
      'product_kit' => 0,
      'panel' => 0,
      'course_handouts' => 0,
      'course_washup' => 0,
      'customer_feedback' => 0,
      'event' => 0,
      'page' => 0,
      'story' => 0,
      'training_course' => 0,
      'training_package' => 0,
      'training_venue' => 0,
      'webform' => 0,
    ),
    'validate_argument_transform' => 0,
    'validate_user_restrict_roles' => 0,
    'override' => array(
      'button' => 'Override',
    ),
  ),
));
$handler->override_option('filters', array(
  'field_c_sched_date_value2' => array(
    'operator' => '>=',
    'value' => array(
      'value' => '2011-01-01 00:00:00',
      'min' => '2011-01-01 00:00:00',
      'max' => '2011-01-01 00:00:00',
      'default_date' => 'now -7 day',
      'default_to_date' => '',
    ),
    'group' => '0',
    'exposed' => TRUE,
    'expose' => array(
      'use_operator' => 0,
      'operator' => 'field_c_sched_date_value2_op',
      'identifier' => 'field_c_sched_date_value2',
      'label' => 'Content: Scheduled Course Date (field_c_sched_date) - To date',
      'optional' => 1,
      'remember' => 0,
    ),
    'date_fields' => array(
      'node_data_field_c_sched_date.field_c_sched_date_value2' => 'node_data_field_c_sched_date.field_c_sched_date_value2',
    ),
    'date_method' => 'OR',
    'granularity' => 'day',
    'form_type' => 'date_select',
    'default_date' => 'now -7 day',
    'default_to_date' => '',
    'year_range' => '-3:+3',
    'id' => 'field_c_sched_date_value2',
    'table' => 'node_data_field_c_sched_date',
    'field' => 'field_c_sched_date_value2',
    'relationship' => 'nid',
    'override' => array(
      'button' => 'Override',
    ),
  ),
));
$handler->override_option('access', array(
  'type' => 'role',
  'role' => array(
    '5' => 5,
    '6' => 6,
    '4' => 4,
  ),
));
$handler->override_option('cache', array(
  'type' => 'none',
));
$handler->override_option('title', 'List of Courses with at least one person signed up:');
$handler->override_option('items_per_page', 100);
$handler->override_option('use_pager', 1);
$handler->override_option('style_plugin', 'bulk');
$handler->override_option('style_options', array(
  'grouping' => 'title',
  'override' => 1,
  'sticky' => 0,
  'order' => 'asc',
  'columns' => array(
    'nid' => 'nid',
    'close_signup_limit' => 'close_signup_limit',
    'type' => 'type',
    'phpcode' => 'phpcode',
    'name' => 'name',
    'value_2' => 'value_2',
    'value' => 'value',
    'value_1' => 'value_1',
    'phpcode_1' => 'phpcode_1',
    'signup_time' => 'signup_time',
    'attended' => 'attended',
    'edit_link' => 'edit_link',
    'field_c_sched_date_value' => 'field_c_sched_date_value',
    'title' => 'title',
    'oid' => 'oid',
    'status' => 'status',
  ),
  'info' => array(
    'nid' => array(
      'sortable' => 0,
      'separator' => '',
    ),
    'close_signup_limit' => array(
      'sortable' => 0,
      'separator' => '',
    ),
    'type' => array(
      'sortable' => 0,
      'separator' => '',
    ),
    'phpcode' => array(
      'separator' => '',
    ),
    'name' => array(
      'sortable' => 1,
      'separator' => '',
    ),
    'value_2' => array(
      'sortable' => 0,
      'separator' => '',
    ),
    'value' => array(
      'sortable' => 0,
      'separator' => '',
    ),
    'value_1' => array(
      'sortable' => 0,
      'separator' => '',
    ),
    'phpcode_1' => array(
      'separator' => '',
    ),
    'signup_time' => array(
      'sortable' => 1,
      'separator' => '',
    ),
    'attended' => array(
      'sortable' => 1,
      'separator' => '',
    ),
    'edit_link' => array(
      'separator' => '',
    ),
    'field_c_sched_date_value' => array(
      'sortable' => 1,
      'separator' => '',
    ),
    'title' => array(
      'sortable' => 0,
      'separator' => '',
    ),
    'oid' => array(
      'separator' => '',
    ),
    'status' => array(
      'sortable' => 0,
      'separator' => '',
    ),
  ),
  'default' => 'field_c_sched_date_value',
  'execution_type' => '1',
  'display_type' => '0',
  'hide_select_all' => 0,
  'skip_confirmation' => 0,
  'display_result' => 1,
  'merge_single_action' => 1,
  'selected_operations' => array(
    'signup_cancel_action' => 'signup_cancel_action',
    'system_message_action' => 'system_message_action',
    'token_actions_message_action' => 'token_actions_message_action',
    'views_bulk_operations_action' => 'views_bulk_operations_action',
    'signup_mark_attended_action' => 'signup_mark_attended_action',
    'signup_mark_not_attended_action' => 'signup_mark_not_attended_action',
    'total_signups_move_action' => 'total_signups_move_action',
    'token_actions_goto_action' => 'token_actions_goto_action',
    'system_goto_action' => 'system_goto_action',
    'system_send_email_action' => 'system_send_email_action',
    'token_actions_send_email_action' => 'token_actions_send_email_action',
    'signup_status_alter_action' => 0,
    'views_bulk_operations_script_action' => 0,
    'views_bulk_operations_argument_selector_action' => 0,
  ),
));
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->override_option('path', 'demo/signup_list');
$handler->override_option('menu', array(
  'type' => 'normal',
  'title' => 'Course Signup Overview',
  'description' => 'Allows authorised users to view and administer course signups.',
  'weight' => '0',
  'name' => 'navigation',
));
$handler->override_option('tab_options', array(
  'type' => 'none',
  'title' => '',
  'description' => '',
  'weight' => 0,
  'name' => 'navigation',
));
$handler = $view->new_display('block', 'Per course signups (Admin)', 'block_1');
$handler->override_option('filters', array());
$handler->override_option('title', 'People signed up for this course:');
$handler->override_option('empty', 'No users are signed up for this course yet');
$handler->override_option('empty_format', '1');
$handler->override_option('block_description', 'Per course signup list (Admin)');
$handler->override_option('block_caching', -1);