How to redirect to same page viewed page after login in opencart 3.0.2.0?
Any one please help me
Thanks
You would need to edit catalog/controller/account/login.php
find for this
if ($this->customer->isLogged()) {
$this->response->redirect($this->url->link('account/account', '', true));
}
and replace it by
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'];
}
Hope this might help You