You are here

commerce_registration.install in Commerce Registration 7

Same filename and directory in other branches
  1. 7.3 commerce_registration.install
  2. 7.2 commerce_registration.install

Commerce Registration install file.

Modify the registration schema to accomodate a commerce order ID number.

File

commerce_registration.install
View source
<?php

/**
 * @file
 *  Commerce Registration install file.
 *
 *  Modify the registration schema to accomodate a commerce order ID number.
 */

/**
 * Implements hook_schema_alter().
 */
function commerce_registration_schema_alter(&$schema) {
  $schema['registration']['fields']['order_id'] = array(
    'description' => 'The order associated with this registration, if any.',
    'type' => 'int',
    'not null' => TRUE,
    'default' => 0,
  );
}

/**
 * Implements hook_enable().
 */
function commerce_registration_enable() {
  commerce_line_item_configure_line_item_type(array(
    'type' => 'waitlist',
  ));
  commerce_product_line_item_configuration(array(
    'type' => 'waitlist',
  ));
}