Prestashop:不保存字段

Prestashop: not saving field

我在 Prestashop 1.6 模块中工作,我遇到了一个似乎无法识别的字段的问题。在控制器中,我使用 renderForm() 方法获取表单,并在表单中定义字段,如下所示:

        array(
            'type' => 'text',
            'label' => $this->l('Message'),
            'name' => 'message',
            'required' => true,
            'hint' => $this->l('Message to be shown when the customer exceeds the quota '),
        ),

在模型中 class 我这样定义它:

    'message' => array(
        'type' => self::TYPE_STRING,
        'validate' => 'isString',
        'required' => true,
        'size' => 4000,
        'db_type'  => 'varchar'
    ),

然后当我尝试保存记录时,我收到此消息:Property QuotaModel->message is empty

我是否在其他地方缺少定义?你能看到我在这里遗漏了什么吗?

感谢您的帮助

在您的对象模型中将字段定义为 public 属性 class。

class QuotaModel extends ObjectModel
{
    ...
    public $message;
    ...
}