I want to add a custom field to the review form in Magento. I have tried this but the data is not saved, it shows the field.
app\code\core\Mage\Adminhtml\Block\Review\Edit\Form.php
$fieldset->addField('email', 'text', array( // New field 1
'label' => Mage::helper('review')->__('Email'),
'required' => true,
'name' => 'email'
));
After
$fieldset->addField('nickname', 'text', array(
'label' => Mage::helper('review')->__('Nickname'),
'required' => true,
'name' => 'nickname'
));
app\design\frontend\theme\theme\template\review\form.phtml
<li class="formlistreview">
<label for="email_field" class="required"><em>*</em><?php echo $this->__('E-mail') ?></label>
<div class="input-box">
<input type="text" name="email" id="email_field" class="input-text required-entry" value="<?php echo $this->htmlEscape($data->getEmail()) ?>" />
</div>
</li>
app\code\core\Mage\Review\Model\Resource\Review.php
protected function _afterSave(Mage_Core_Model_Abstract $object)
{
$detail = array(
'title' => $object->getTitle(),
'detail' => $object->getDetail(),
'nickname' => $object->getNickname(),
'email' => $object->getEmail(), // New field 1
);
What am I missing?