function uc_order_install in Ubercart 7.3
Same name and namespace in other branches
- 5 uc_order/uc_order.install \uc_order_install()
- 6.2 uc_order/uc_order.install \uc_order_install()
Implements hook_install().
File
- uc_order/
uc_order.install, line 632 - Install, update and uninstall functions for the uc_order module.
Code
function uc_order_install() {
$t = get_t();
$query = db_insert('uc_order_statuses')
->fields(array(
'order_status_id',
'title',
'state',
'weight',
'locked',
));
$values = array(
array(
'order_status_id' => 'abandoned',
'title' => $t('Abandoned'),
'state' => 'canceled',
'weight' => -30,
'locked' => 1,
),
array(
'order_status_id' => 'canceled',
'title' => $t('Canceled'),
'state' => 'canceled',
'weight' => -20,
'locked' => 1,
),
array(
'order_status_id' => 'in_checkout',
'title' => $t('In checkout'),
'state' => 'in_checkout',
'weight' => -10,
'locked' => 1,
),
array(
'order_status_id' => 'pending',
'title' => $t('Pending'),
'state' => 'post_checkout',
'weight' => 0,
'locked' => 1,
),
array(
'order_status_id' => 'processing',
'title' => $t('Processing'),
'state' => 'post_checkout',
'weight' => 5,
'locked' => 1,
),
array(
'order_status_id' => 'completed',
'title' => $t('Completed'),
'state' => 'completed',
'weight' => 20,
'locked' => 1,
),
);
foreach ($values as $record) {
$query
->values($record);
}
$query
->execute();
}