Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8"?>
- <config>
- <modules>
- <Practice_CheckoutComments>
- <active>true</active>
- <codePool>local</codePool>
- <depends>
- <Mage_Sales />
- <Mage_CatalogInventory />
- <Mage_Checkout />
- </depends>
- </Practice_CheckoutComments>
- </modules>
- </config>
- <?xml version="1.0" encoding="UTF-8"?>
- <config>
- <modules>
- <Practice_CheckoutComments>
- <version>0.0.1</version>
- </Practice_CheckoutComments>
- </modules>
- <global>
- <resources>
- <checkoutcomments_setup>
- <setup>
- <module>Practice_CheckoutComments</module>
- </setup>
- </checkoutcomments_setup>
- </resources>
- </global>
- </config>
- <?php
- $installer = $this;
- $installer->startSetup();
- $table = $installer->getConnection()
- ->newTable($installer->getTable('checkoutcomments/comments_table'))
- ->addColumn('comment_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null,
- array(
- 'identity' => true,
- 'unsigned' => true,
- 'nullable' => false,
- 'primary' => true
- ), 'Comment ID')
- ->addColumn('order_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null,
- array(
- 'unsigned' => true,
- 'nullable' => false
- ), 'Real Order ID')
- ->addColumn('comment', Varien_Db_Ddl_Table::TYPE_TEXT, '64k', array(), 'Comment')
- ->addForeignKey(
- $installer->getFkName('checkoutcomments/comments_table', 'order_id',
- 'sales/order', 'entity_id'), 'order_id',
- $installer->getTable('sales/order'), 'entity_id',
- Varien_Db_Ddl_Table::ACTION_CASCADE, Varien_Db_Ddl_Table::ACTION_CASCADE)
- ->setComment('Checkout Comments');
- $installer->getConnection()->createTable($table);
- $installer->endSetup();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement