opencart 3.0.2.0删除模型要求的限制

opencart 3.0.2.0删除模型要求的限制,opencart,Opencart,如何从opencart v 3.0.2.0的管理产品页面的模型字段中删除“需要的模型”,并使其成为与数据选项卡中的其他字段一样的可选字段? 不插入型号是不正确的。否,我仍然向您展示 admin\controller\catalog\product.php 至第1193行-近似值 在受保护的函数validateForm()中找到此代码{ if ((utf8_strlen($this->request->post['model']) < 1) || (utf8_strlen($th

如何从opencart v 3.0.2.0的管理产品页面的模型字段中删除“需要的模型”,并使其成为与数据选项卡中的其他字段一样的可选字段?

不插入型号是不正确的。否,我仍然向您展示

admin\controller\catalog\product.php

至第1193行-近似值

在受保护的函数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');
} 
评论后

/*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');
} */

您必须对该代码进行注释,或者您可以将其删除,但我认为您将来需要该代码,因此请仅对该代码进行注释,不要删除它。

谢谢您。我对您建议的代码进行了注释,但它没有帮助,并且仍然需要模型。您正在使用哪个opencart版本。?使用v 3.0.2.0