williamespindola Posted April 30, 2014 Share Posted April 30, 2014 I create a simple code to add a new fiel on customer table. The code is this: <?php class Customer extends CustomerCore { public function __construct($id = null) { $this->addCpfField(); parent::__construct($id); } public function addCpfField() { return parent::$definition['fields']['cpf'] = array( 'type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true, 'size' => 14 ); } } ALTER TABLE ps_customer ADD cpf VARCHAR(14) NOT NULL AFTER lastname; But, when open the your profile http://localhost/identity to edit your data I have the following error: Notice: Undefined property: Customer::$cpf in /home/william/public_html/classes/ObjectModel.php on line 833 I looked this class ObjectModel.php and debug it, the cpf field exist on definition property but not as a property. Some tip? Thanks Link to comment Share on other sites More sharing options...
williamespindola Posted May 1, 2014 Author Share Posted May 1, 2014 Anybody? Link to comment Share on other sites More sharing options...
williamespindola Posted May 1, 2014 Author Share Posted May 1, 2014 The solution, just add cpf property on class overwriting. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now