vazeem Posted August 27, 2015 Share Posted August 27, 2015 How to add extra field in catagories page in back office.And the field should be see in back office catalog->categories page.should be like given picture. Link to comment Share on other sites More sharing options...
vekia Posted August 27, 2015 Share Posted August 27, 2015 exmaple of adding field: myNewField add new field to ps_category table myNewField Varchar(50) NULL in classes/Category.hpp add MyNewFIeld to class definition /** @var string our new field*/ public $myNewField; and in objectModel::definition: 'fields' => array( 'nleft' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), 'myNewField' => array('type' => self::TYPE_STRING, 'validate' => 'isCleanHtml'), then in category controller: controllers/adminCategoriesController.php to $this->fields_list add new array element: $this->fields_list = array( 'id_category' => array( 'title' => $this->l('ID'), 'align' => 'center', 'class' => 'fixed-width-xs' ), 'name' => array( 'title' => $this->l('Name') ), 'myNewField' => array( 'title' => $this->l('New Field') ), Link to comment Share on other sites More sharing options...
vazeem Posted September 1, 2015 Author Share Posted September 1, 2015 (edited) Hi vekia, Yeah its working now.But i cant see that field in add new category page.Can you explain how can we see the new field in add new category page like name,image,description,meta title... Edited September 1, 2015 by vazeem (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts