在 opencart 2.0.3.1 中注册后如何重定向用户?

How to redirect User after registration in opencart 2.0.3.1?

我的注册页面 URL 像: www.exmpl.com/index.php?route=account/register 当我在填写完所有字段后提交时,它会将我重定向到登录页面,但我想重定向它以谢谢 page.How 我可以吗这样做?

这个函数(在/catalog/controller/account/register.php)负责重定向($this->response->redirect($this->url->link('account/success'));,更准确地说)。只需要检查哪个页面是 "thank you" 页面(我现在不确定)。

if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {
            $customer_id = $this->model_account_customer->addCustomer($this->request->post);

            // Clear any previous login attempts for unregistered accounts.
            $this->model_account_customer->deleteLoginAttempts($this->request->post['email']);

            $this->customer->login($this->request->post['email'], $this->request->post['password']);

            unset($this->session->data['guest']);

            // Add to activity log
            $this->load->model('account/activity');

            $activity_data = array(
                'customer_id' => $customer_id,
                'name'        => $this->request->post['firstname'] . ' ' . $this->request->post['lastname']
            );

            $this->model_account_activity->addActivity('register', $activity_data);

            $this->response->redirect($this->url->link('account/success'));
        }