I have created a module which requires an additional field to be added to the sales_flat_quote table / model.
Everything appears to work fine in my install script and the new field can be seen in the database.
When retrieving a quote object and storing a value against my new field the value never gets recorded to the database. The save method doesnt product an error or exception but the value never sticks.
If it makes a difference, I am trying to save the value to the quote from an observer, during the checkout process.
Here is the code I am using in my install script:
$setup = new Mage_Sales_Model_Mysql4_Setup('sales_setup');
$setup->getConnection()->addColumn(
$setup->getTable('sales_flat_quote'),
'test_attribute',
'text NULL DEFAULT NULL'
);
$setup->addAttribute('quote', 'test_attribute', array('type' => 'text', 'visible' => false));
Am I missing something obvious here?