Post by jonghwa » Tue Nov 27, 2012 5:48 pm

Hi,

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'));
        }

핀코인 (http://pincoin.co.kr)

extensions by pincoin


User avatar
New member

Posts

Joined
Thu Oct 25, 2012 12:29 pm
Location - Seoul

Post by jonghwa » Wed Nov 28, 2012 6:39 pm

bump;;;

Doesn't opencart provide the way to inject user customized codes in controllers, models or views?

핀코인 (http://pincoin.co.kr)

extensions by pincoin


User avatar
New member

Posts

Joined
Thu Oct 25, 2012 12:29 pm
Location - Seoul
Who is online

Users browsing this forum: No registered users and 103 guests