Projet

Général

Profil

Paste
Télécharger (3,31 ko) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / commerce / modules / checkout / commerce_checkout.install @ b858700c

1
<?php
2

    
3
/**
4
 * Implements hook_schema().
5
 */
6
function commerce_checkout_schema() {
7
  $schema = array();
8

    
9
  $schema['commerce_checkout_pane'] = array(
10
    'description' => 'Checkout pane configuration data.',
11
    'fields' => array(
12
      'pane_id' => array(
13
        'description' => 'The machine readable name of the order state.',
14
        'type' => 'varchar',
15
        'length' => 255,
16
        'not null' => TRUE,
17
      ),
18
      'page' => array(
19
        'description' => 'The ID of the checkout page on which this pane appears.',
20
        'type' => 'varchar',
21
        'length' => 255,
22
        'not null' => TRUE,
23
        'default' => '1',
24
      ),
25
      'fieldset' => array(
26
        'description' => 'Boolean value indicating whether or not the pane should appear in a fieldset.',
27
        'type' => 'int',
28
        'size' => 'tiny',
29
        'not null' => TRUE,
30
        'default' => 1,
31
      ),
32
      'collapsible' => array(
33
        'description' => 'Boolean value indicating whether or not the pane should appear collapsed.',
34
        'type' => 'int',
35
        'size' => 'tiny',
36
        'not null' => TRUE,
37
        'default' => 0,
38
      ),
39
      'collapsed' => array(
40
        'description' => 'Boolean value indicating whether or not the pane should appear collapsed.',
41
        'type' => 'int',
42
        'size' => 'tiny',
43
        'not null' => TRUE,
44
        'default' => 0,
45
      ),
46
      'weight' => array(
47
        'description' => 'The sorting weight of the status for lists of statuses.',
48
        'type' => 'int',
49
        'size' => 'small',
50
        'not null' => TRUE,
51
        'default' => 0,
52
      ),
53
      'enabled' => array(
54
        'description' => 'Boolean value indicating whether or not the pane is enabled.',
55
        'type' => 'int',
56
        'size' => 'tiny',
57
        'not null' => TRUE,
58
        'default' => 1,
59
      ),
60
      'review' => array(
61
        'description' => 'Boolean value indicating whether or not the pane should appear on the checkout review.',
62
        'type' => 'int',
63
        'size' => 'tiny',
64
        'not null' => TRUE,
65
        'default' => 1,
66
      ),
67
    ),
68
    'primary key' => array('pane_id'),
69
  );
70

    
71
  return $schema;
72
}
73

    
74
/**
75
 * Implements hook_uninstall().
76
 */
77
function commerce_checkout_uninstall() {
78
  variable_del('commerce_checkout_completion_message');
79
}
80

    
81
/**
82
 * Delete the deprecated checkout completion message override variable.
83
 */
84
function commerce_checkout_update_7100() {
85
  variable_del('commerce_checkout_completion_message_override');
86
}
87

    
88
/**
89
 * Disable the new local action to simulate checkout completion for an order.
90
 */
91
function commerce_checkout_update_7101() {
92
  variable_set('commerce_order_simulate_checkout_link', FALSE);
93
  return t('A new local action link on order edit forms for simulating checkout completion for an order has been disabled by default; enable it on the order settings form if desired.');
94
}
95

    
96
/**
97
 * Disable the new checkout completion rule that updates order created dates to
98
 * the checkout completion date.
99
 */
100
function commerce_checkout_update_7102() {
101
  variable_set('enable_commerce_checkout_order_created_date_update', FALSE);
102
  return t('A new core checkout completion rule has been added that updates order creation timestamps to the time of checkout completion. It has been disabled by default to not interfere with existing order workflows, but you may enable it in your checkout settings if desired.');
103
}