You are here

function course_signup_add_to_cart in Course 6

Same name and namespace in other branches
  1. 7.2 modules/course_signup/course_signup.module \course_signup_add_to_cart()
  2. 7 modules/course_signup/course_signup.module \course_signup_add_to_cart()

Implements hook_add_to_cart().

Skip the uc_signup screens for course signups.

File

modules/course_signup/course_signup.module, line 181

Code

function course_signup_add_to_cart($nid, $qty, $data) {
  global $user;
  $node = node_load($nid);
  if (course_node_is_course($node) && $node->signup) {

    // Node is a course and a signup.
    $_SESSION['uc_signup']['nids'][$nid][0] = $user->mail;
  }
}