opencart 3.0.2.0 去除模型要求限制

opencart 3.0.2.0 remove model required restriction

如何从 opencart v 3.0.2.0 的管理产品页面的模型字段中删除 "model required",并使其像数据选项卡中的其他字段一样成为可选字段? model required screenshot

不插入型号是不正确的,我还是给你看。

admin\controller\catalog\product.php

转到第 1193 行 - 近似值

protected function validateForm() {

中找到这段代码
if ((utf8_strlen($this->request->post['model']) < 1) || (utf8_strlen($this->request->post['model']) > 64)) {
            $this->error['model'] = $this->language->get('error_model');
        } 

评论后

/*if ((utf8_strlen($this->request->post['model']) < 1) || (utf8_strlen($this->request->post['model']) > 64)) {
                $this->error['model'] = $this->language->get('error_model');
            } */

你必须评论这段代码或者你可以删除它,但我认为你以后需要这段代码所以只评论这段代码不要删除它。