basic_cart_order.install in Basic cart 7.3
Same filename and directory in other branches
Basic Cart Order install file
File
basic_cart_order/basic_cart_order.installView source
<?php
/**
* @file
* Basic Cart Order install file
*/
/**
* Implements hook_schema().
*/
function basic_cart_order_schema() {
$schema['basic_cart_order_node'] = array(
'description' => 'Basic cart order registration table.',
'fields' => array(
'oid' => array(
'description' => 'The primary identifier for an order.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
'nid' => array(
'description' => 'Order node.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
'quantity' => array(
'description' => 'Order node quantity.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
),
'primary key' => array(
'oid',
'nid',
),
);
return $schema;
}
/**
* Removing the required property from total price.
*/
function basic_cart_order_update_7200() {
$instance_info = field_info_instance('node', 'field_total_price', 'order');
$instance_info['required'] = FALSE;
field_update_instance($instance_info);
}
Functions
Name![]() |
Description |
---|---|
basic_cart_order_schema | Implements hook_schema(). |
basic_cart_order_update_7200 | Removing the required property from total price. |