File upload prestashop 1.6将(上载文件)字段添加到类别

File upload prestashop 1.6将(上载文件)字段添加到类别,file-upload,field,prestashop,add-in,File Upload,Field,Prestashop,Add In,您好,我在将上传文件字段添加到类别(管理员)时遇到问题。 这就是我所做的: 复制/controllers/admin/AdminCategoriesController.php>>/override/controllers/admin/ 在内部,我删除了除了renderForm()函数之外的所有内容,因此我的代码如下所示: class AdminCategoriesController extends AdminCategoriesControllerCore { pub

您好,我在将上传文件字段添加到类别(管理员)时遇到问题。
这就是我所做的:
复制/controllers/admin/AdminCategoriesController.php>>/override/controllers/admin/
在内部,我删除了除了renderForm()函数之外的所有内容,因此我的代码如下所示:
class AdminCategoriesController extends AdminCategoriesControllerCore { public function renderForm() { everything from original file ... return AdminController::renderForm(); } } $this->fields_form = array(...
'input' => array(
HERE array( 'type' => 'file', 'label' => $this->l('File'), 'name' => 'new_file', 'file' => isset($link) ? $link : null, 'size' => isset($size) ? $size : null, 'delete_url' => self::$currentIndex.'&'.$this->identifier.'='.$this->_category->id.'&token='.$this->token.'&deleteFile=1', 'hint' => $this->l('Upload a file to category from your computer.'), ), if (($obj = $this->loadObject(true)) && Validate::isLoadedObject($obj)) { $link = $this->context->link->getPageLink('category', true, NULL, 'id_category='.$obj->id);

  if (file_exists(_PS_CAT_IMG_DIR_.$obj->file))
    $size = round(filesize(_PS_CAT_IMG_DIR_.$obj->file) / 1024);
}

But it won't copy the file on server ...
Thank for any answers.