I am adding custom field to address by overiding Address class:
<?php
class Address extends AddressCore
{
public $extrafield;
public function __construct($id_address = null, $id_lang = null)
{
self::$definition['fields']['extrafield'] = array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'size' => 64);
parent::__construct($id_address, $id_lang);
}
}
Also I have modified the template to add the new input field.
This scenario is working in PrestaShop 1.6, new input is saved in database. But in PrestaShop 1.7, the new input is not saved in database. Am I missing something here ?
Thanks