00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 $installer = $this;
00028
00029
00030 $installer->startSetup();
00031
00032 $installer->run("
00033
00034 -- DROP TABLE IF EXISTS {$this->getTable('gift_message')};
00035 CREATE TABLE {$this->getTable('gift_message')} (
00036 `gift_message_id` int(7) unsigned NOT NULL auto_increment,
00037 `customer_id` int(7) unsigned NOT NULL default '0',
00038 `sender` varchar(255) NOT NULL default '',
00039 `recipient` varchar(255) NOT NULL default '',
00040 `message` text NOT NULL,
00041 PRIMARY KEY (`gift_message_id`)
00042 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00043
00044 ");
00045
00046 $installer->endSetup();
00047
00048 $installer->addAttribute('quote', 'gift_message_id', array('type' => 'int', 'visible' => false, 'required' => false));
00049 $installer->addAttribute('quote_address', 'gift_message_id', array('type' => 'int', 'visible' => false, 'required' => false));
00050 $installer->addAttribute('quote_item', 'gift_message_id', array('type' => 'int', 'visible' => false, 'required' => false));
00051 $installer->addAttribute('quote_address_item', 'gift_message_id', array('type' => 'int', 'visible' => false, 'required' => false));
00052 $installer->addAttribute('order', 'gift_message_id', array('type' => 'int', 'visible' => false, 'required' => false));
00053 $installer->addAttribute('order_item', 'gift_message_id', array('type' => 'int', 'visible' => false, 'required' => false));
00054 $installer->addAttribute('order_item', 'gift_message_available', array('type' => 'int', 'visible' => false, 'required' => false));
00055 $installer->addAttribute('catalog_product', 'gift_message_available', array(
00056 'backend' => 'giftmessage/entity_attribute_backend_boolean_config',
00057 'frontend' => '',
00058 'label' => 'Allow Gift Message',
00059 'input' => 'select',
00060 'class' => '',
00061 'source' => 'giftmessage/entity_attribute_source_boolean_config',
00062 'global' => true,
00063 'visible' => true,
00064 'required' => false,
00065 'user_defined' => false,
00066 'default' => '2',
00067 'visible_on_front' => false
00068 ));