07-26-2023, 11:25 PM
I added 3 fields to the layout at \themes\classic\modules\contactform\views\templates\widget\contactform.tpl and they show up perfect.
I added these 3 fields to the DB table customer_thread.
Contact requests are saved into this table except for the 3 new fields.
I also changed the CustomerThread.php class in
public static $definition = array(
'table' => 'customer_thread',
'primary' => 'id_customer_thread',
'fields' => array(
'id_lang' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true),
'id_contact' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true),
'id_shop' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
'id_customer' =>array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
'id_order' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
'id_product' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
'email' => array('type' => self::TYPE_STRING, 'validate' => 'isEmail', 'size' => 254),
'tel' => array('type' => self::TYPE_STRING, 'validate' => 'isString', 'size' => 254),
'naam' => array('type' => self::TYPE_STRING, 'validate' => 'isString', 'size' => 254),
'voornaam' => array('type' => self::TYPE_STRING, 'validate' => 'isString', 'size' => 254),
'token' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true),
'status' => array('type' => self::TYPE_STRING),
'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
),
);
The 3 new fields are tel, naam and voornaam.
What am I missing ?
I added these 3 fields to the DB table customer_thread.
Contact requests are saved into this table except for the 3 new fields.
I also changed the CustomerThread.php class in
public static $definition = array(
'table' => 'customer_thread',
'primary' => 'id_customer_thread',
'fields' => array(
'id_lang' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true),
'id_contact' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true),
'id_shop' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
'id_customer' =>array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
'id_order' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
'id_product' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
'email' => array('type' => self::TYPE_STRING, 'validate' => 'isEmail', 'size' => 254),
'tel' => array('type' => self::TYPE_STRING, 'validate' => 'isString', 'size' => 254),
'naam' => array('type' => self::TYPE_STRING, 'validate' => 'isString', 'size' => 254),
'voornaam' => array('type' => self::TYPE_STRING, 'validate' => 'isString', 'size' => 254),
'token' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true),
'status' => array('type' => self::TYPE_STRING),
'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
),
);
The 3 new fields are tel, naam and voornaam.
What am I missing ?