Prestashop 1.7 客户自定义字段奇怪行为

问题描述

我在 ps_customer 数据库和客户类中添加了两个新变量:

/** @var string ricetta */
public $ricetta;

/** @var int agente */
public $agente;

在定义数组中:

        'agente' => array('type' => self::TYPE_INT,'size' => 11),'ricetta' => array('type' => self::TYPE_STRING,'required' => true),

一切都很完美;我可以在管理区域和整个环境中管理这些字段。

但是在前端调用 PasswordControllerCore 时会发生一些非常奇怪的事情。

我发现当 $customer->update();消耗后,数据库中的两个新字段 ($ricetta) 之一变为空。

客户更新删除了这个,但不删除其他自定义字段。($agente)

我为此变得疯狂......无法理解发生了什么:-(

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)