I have a model in an extension. I want to add a new database attribute and make this value editable through Magento admin using Varien_Data_Form. I have added the field to the database through installer script, the field is displayed on the admin, but I don't know how to save it.
The form data is posted and saved to a $data variable, the model is loaded and has a setData($data) called, and after that the model is saved, but to no avail. Dumping $data just before the setData() call shows the variable is fine.
Saving occurs inside a try block, no errors are thrown/catched.
...
$model = Mage::getModel('cmspro/category');
$model->setData($data)->setId($this->getRequest()->getParam('id'));
...
try {
...
$model->save();
...
} catch (Exception $e) {
...
}
-
So what is the problem? Where is the question?oleksii.svarychevskyi– oleksii.svarychevskyi2014年02月28日 11:49:06 +00:00Commented Feb 28, 2014 at 11:49
1 Answer 1
After changing the structure of a table clear the cache.
Delete the contents of var/cache.
Even if the cache is disabled the table schema is still cached by Zend Framework.
Explore related questions
See similar questions with these tags.