
This field also appears in the Admin customer section so you can see who refered who.
i created this so that i could award people reward points for referring people to the store whoever this still has to be done manually, so you can technically use it for what ever you want. so the code.
File 1 path
.../catalog/view/theme/default/template/account/register.tpl
Part one
Code: Select all
<tr>
<td><?php echo $entry_referer; ?></td>
<td><input type="text" name="referer" value="<?php echo $referer; ?>" /></td>
</tr>
.../catalog/model/account/customer.php
Part one
Code: Select all
"', referer = '" . $this->db->escape($data['referer']) .
Code: Select all
$message .= $this->language->get('text_referer') . ' ' . $data['referer'] . "\n";
Code: Select all
"', referer = '" . $this->db->escape($data['referer']) .
.../catalog/controller/account/register.php
Part one
Code: Select all
$this->data['entry_referer'] = $this->language->get('Referers Email:');
Part two
Code: Select all
if (isset($this->request->post['referer'])) {
$this->data['fax'] = $this->request->post['referer'];
} else {
$this->data['referer'] = '';
}
File 4 path
.../admin/view/template/sale/customer_form.tpl
Part one
Code: Select all
<tr>
<td><?php echo $entry_referer; ?></td>
<td><input type="text" name="referer" value="<?php echo $referer; ?>" /></td>
</tr>
.../admin/model/sale/customer.php
Part one
Code: Select all
"', referer = '" . $this->db->escape($data['referer']) .
Code: Select all
"', referer = '" . $this->db->escape($data['referer']) .
File 6 path
../admin/controller/sale/customer.php
Part one
Code: Select all
$this->data['entry_referer'] = $this->language->get('entry_referer');
Code: Select all
if (isset($this->request->post['referer'])) {
$this->data['referer'] = $this->request->post['referer'];
} elseif (!empty($customer_info)) {
$this->data['referer'] = $customer_info['referer'];
} else {
$this->data['referer'] = '';
Code: Select all
'referer' => $result['referer'],
and find our customer data base and add the field