Uaitstudio Posted June 12, 2018 Share Posted June 12, 2018 Hello to all, Whenever I try to create a user on the site, I get this error back Notice: Undefined property: Customer::$vat_number in /home/seco1348/public_html/classes/ObjectModel.php on line 1124 [PrestaShopDatabaseException] Unknown column 'vat_number' in 'field list' INSERT INTO `ps_customer` (`secure_key`, `lastname`, `firstname`, `email`, `passwd`, `last_passwd_gen`, `id_gender`, `birthday`, `newsletter`, `newsletter_date_add`, `ip_registration_newsletter`, `optin`, `website`, `company`, `siret`, `ape`, `outstanding_allow_amount`, `show_public_prices`, `id_risk`, `max_payment_days`, `active`, `deleted`, `note`, `is_guest`, `id_shop`, `id_shop_group`, `id_default_group`, `id_lang`, `date_add`, `date_upd`, `vat_number`) VALUES ('4a185d9bda725af740de051d328d55c1', 'Ghedin', 'Matteo', '[email protected]', 'b393f1cfc34b0224a21a2ef84fa6daa3', '2018-06-12 15:08:18', '1', '1933-2-2', '0', '0000-00-00', NULL, '0', NULL, 'Matteo Ghedin', NULL, NULL, '0', '0', '0', '0', '1', '0', NULL, '0', '1', '1', '3', '6', '2018-06-12 16:08:18', '2018-06-12 16:08:18', 'IT04021910270') at line 791 in file classes/db/Db.php 786. if ($webservice_call && $errno) { 787. $dbg = debug_backtrace(); 788. WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97); 789. } elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS')) { 790. if ($sql) { 791. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>'); 792. } 793. 794. throw new PrestaShopDatabaseException($this->getMsgError()); 795. } 796. } DbCore->displayError - [line 425 - classes/db/Db.php] - [1 Arguments] DbCore->query - [line 763 - classes/db/Db.php] - [1 Arguments] DbCore->q - [line 514 - classes/db/Db.php] - [2 Arguments] DbCore->insert - [line 487 - classes/ObjectModel.php] - [3 Arguments] ObjectModelCore->add - [line 230 - classes/Customer.php] - [2 Arguments] CustomerCore->add - [line 593 - controllers/front/AuthController.php] AuthControllerCore->processSubmitAccount - [line 256 - controllers/front/AuthController.php] AuthControllerCore->postProcess - [line 178 - classes/controller/Controller.php] ControllerCore->run - [line 367 - classes/Dispatcher.php] DispatcherCore->dispatch - [line 28 - index.php] How i can resolver? Thanks Link to comment Share on other sites More sharing options...
NemoPS Posted June 14, 2018 Share Posted June 14, 2018 Reach the database, ps_customer table, and add vat_number as new varchar field, 24 in length Link to comment Share on other sites More sharing options...
tuk66 Posted June 15, 2018 Share Posted June 15, 2018 The vat_number field belongs to ps_address table for several years so you probably use a patch. I would rather not use it. As you can see, it only causes problems. 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