如何在 opencart 3.0.2.0 登录后重定向到同一页面?
How to redirect to same page after login in opencart 3.0.2.0?
如何在opencart 3.0.2.0登录后重定向到同一页面查看页面?
哪位大侠帮帮我
谢谢
您需要编辑 catalog/controller/account/login.php
找到这个
if ($this->customer->isLogged()) {
$this->response->redirect($this->url->link('account/account', '', true));
}
并替换为
if ($this->customer->isLogged()) {
$this->response->redirect($this->url->link('account/account', '', 'ture'));
}elseif(!isset($this->session->data['redirect']) && isset($_SERVER['HTTP_REFERER'])){
$this->session->data['redirect'] = $_SERVER['HTTP_REFERER'];
}
希望这对您有所帮助
如何在opencart 3.0.2.0登录后重定向到同一页面查看页面?
哪位大侠帮帮我
谢谢
您需要编辑 catalog/controller/account/login.php
找到这个
if ($this->customer->isLogged()) {
$this->response->redirect($this->url->link('account/account', '', true));
}
并替换为
if ($this->customer->isLogged()) {
$this->response->redirect($this->url->link('account/account', '', 'ture'));
}elseif(!isset($this->session->data['redirect']) && isset($_SERVER['HTTP_REFERER'])){
$this->session->data['redirect'] = $_SERVER['HTTP_REFERER'];
}
希望这对您有所帮助