I'd like to give some reward points to my members as soon as they join.
I found that it can be done by inserting the record into "customer_reward" table.
I wanted to make an extension, but it doesn't look suitable with modules, shipping, payment, total or feed.
Do I have to modify directly controller/account/register.php?
Code: Select all
if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {
$this->model_account_customer->addCustomer($this->request->post);
$this->customer->login($this->request->post['email'], $this->request->post['password']);
unset($this->session->data['guest']);
// Default Shipping Address
if ($this->config->get('config_tax_customer') == 'shipping') {
$this->session->data['shipping_country_id'] = $this->request->post['country_id'];
$this->session->data['shipping_zone_id'] = $this->request->post['zone_id'];
$this->session->data['shipping_postcode'] = $this->request->post['postcode'];
}
// Default Payment Address
if ($this->config->get('config_tax_customer') == 'payment') {
$this->session->data['payment_country_id'] = $this->request->post['country_id'];
$this->session->data['payment_zone_id'] = $this->request->post['zone_id'];
}
// Add code here???
$this->redirect($this->url->link('account/success'));
}