uc_atctweaks.install in UC Add to Cart Tweaks 6
Same filename and directory in other branches
Installs the necessary table for the Add to Cart Tweaks product features.
File
uc_atctweaks.installView source
<?php
/**
* @file
* Installs the necessary table for the Add to Cart Tweaks product features.
*/
function uc_atctweaks_schema() {
$schema = array();
$schema['uc_atctweaks_products'] = array(
'fields' => array(
'vpid' => array(
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'pfid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'cart_empty' => array(
'description' => t('Cart empty setting for this instance of the feature.'),
'type' => 'int',
'size' => 'small',
'not null' => TRUE,
'default' => 0,
),
'redirect' => array(
'description' => t('Add to cart redirect for this instance of the feature.'),
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
),
'indexes' => array(
'pfid' => array(
'pfid',
),
),
'primary key' => array(
'vpid',
),
);
return $schema;
}
function uc_atctweaks_install() {
drupal_install_schema('uc_atctweaks');
}
function uc_atctweaks_uninstall() {
drupal_uninstall_schema('uc_atctweaks');
db_query("DELETE FROM {uc_product_features} WHERE fid = 'atctweaks'");
}
Functions
Name![]() |
Description |
---|---|
uc_atctweaks_install | |
uc_atctweaks_schema | @file Installs the necessary table for the Add to Cart Tweaks product features. |
uc_atctweaks_uninstall |