Hi,
I am still trying to add one simple field to the customer registration form in PS 1.6. I'm following Nemo's great tutorials here, using the "Adding extra fields to other Object types" section, but when I finish and try to register using the new field, it is not inserted into the database. Dev Mode shows no errors.
What I've done so far is:
created a new database text field "newfield"
created a new file, Customers.php, in "override/classes" with the following code:
Class Customer extends CustomerCore
{
public $newfield;
public function __construct($id = null)
{
$this->id_default_group = (int)Configuration::get('PS_CUSTOMER_GROUP');
parent::__construct($id);
}
}
copied the "renderForm()" method from "controllers/admin/AdminCustomersController.php" to "override/controllers/admin/AdminCustomersController.php", changed the last line to "return AdminController::renderForm();" and added this to the copied array list:
array(
'type' => 'text',
'label' => $this->l('Our new field:'),
'name' => 'newfield',
'size' => 64
),
I then added the html for the newfield to the authentication.tpl file in my theme.
The field shows up in the registration form, but when I sign up, there is only NULL in the database for that new field.
Please help?