Let me just state that
if you add fields like birth_date to the database then that leaves you with problems when db revisions come in subsequent OC releases. But this is a test setup so I don't mind messing it up.
Once the mySQL tables are being properly updated you will not see the birthdate field being displayed anywhere in OC.
To add the view to the admin panel you must make a number of edits.
have to edit
system/library/customer.php
after private $address_id;
add private $birth_date;
after $this->fax = $customer_query->row['fax'];
add $this->birth_date = $customer_query->row['birth_date'];
after $this->fax = $customer_query->row['fax'];
add $this->birth_date = $customer_query->row['birth_date'];
after $this->fax = '';
add $this->birth_date = '';
after public function getTelephone() {
return $this->telephone;
}
add public function getBirth_date() {
return $this->birth_date;
}
--
store/admin/view/template/sale/customer_form.tpl
edit:
after <table class="form">
add
<tr>
<td><?php echo $entry_birth_date; ?></td>
<td><input type="text" name="birth_date" value="<?php echo $birth_date; ?>" /></td>
</tr>
===
/admin/controller/sale/customer.php
after $this->data['entry_fax'] = $this->language->get('entry_fax');
add $this->data['entry_birth_date'] = $this->language->get('entry_birth_date');
after if (isset($this->request->post['fax'])) {
$this->data['fax'] = $this->request->post['fax'];
} elseif (isset($customer_info)) {
$this->data['fax'] = $customer_info['fax'];
} else {
$this->data['fax'] = '';
}
add if (isset($this->request->post['birth_date'])) {
$this->data['birth_date'] = $this->request->post['birth_date'];
} elseif (isset($customer_info)) {
$this->data['birth_date'] = $customer_info['birth_date'];
} else {
$this->data['birth_date'] = '';
}
===
/admin/language/english/sale/customer.php
$_['entry_fax'] = 'Fax:';
$_['entry_birth_date'] = 'Birth_date:';
= = = = = =
Please note that these edits don't allow you to correct an incorrect birthdate entry. It will only allow you to view what was input into the table previously.
To make edits from the customer view in admin you would have to edit the sql statement in model to include an UPDATE for the corrected entry.
WHew! that was fun.
