Feedback form not submitted

In my project, I added a new field locationin the “product overviews” of the admin panel, following the steps as described in many blogs.

  • Created a new field in the database table review_detailas location.
  • The following code is added in app/code/code/Mage/Adminhtml/Block/Review/Edit/Form.php

        $fieldset->addField('location', 'text', array(
                'name'  => 'location',
                'label' => Mage::helper('adminhtml')->__('Location'),
                'required' => false
            )
        ); 
    

Just above:

    $fieldset->addField('nickname', 'text', array(
        'label'     => Mage::helper('review')->__('Nickname'),
        'required'  => true,
        'name'      => 'nickname'
    ));
  • . Add the following code toapp/code/core/Mage/Review/Model/Resource/Review.php

    $detail = array(
        'title'     => $object->getTitle(),
        'detail'    => $object->getDetail(),
        'nickname'  => $object->getNickname(),
        'location'  => $object->getLocation()   /* added */
    );
    
  • Added "location" in the lower array of functions. In file:app/code/core/Mage/Review/Model/Resource/Review/Collection.php

    protected function _initSelect()
    {
        parent::_initSelect();
        $this->getSelect()
            ->join(array('detail' => $this->_reviewDetailTable),
                'main_table.review_id = detail.review_id',
                array('detail_id', 'title', 'detail', 'nickname', 'customer_id','location'));
        return $this;
    }
    
  • The {$mytheme}/template/review/form.phtmlfollowing is added:

    <li>
          <label for="location_field" class="required"><em>*</em><?php echo $this->__('Location') ?></label>
          <div class="input-box">
               <input type="text" name="nickname" id="location_field" class="input-text required-entry" value="<?php echo $this->htmlEscape($data->getLocation()) ?>" />
          </div>
    </li>   
    

My problem is that although I can see the new field in the admin panel, whenever I submit the review form, it is not submitted / not stored in the database.

I even re-indexed and cleared the cache.

What should I change to make it work correctly?

Please help ... I'm in purple 1.8.

PS: , . , .

+4
3

, quetion. , .

, , , {$mytheme}/template/review/form.phtml

name="nickname" name="location"

, , , .

+2

html, . :

  • -tags?
  • ?
  • (, chrome F12), , .
0

, db. core_resource . db . , , varien-, .

, .

0

All Articles