This mod will persist that initial target after logging in. So when you click edit... if you are redirected to login... after logging it, you will go back to that product you were about to edit. Saves much frustrating time than having to renavigate.
This was one of the best features of OpenCart 0.x but was removed in 1.x. This adds it back
(Should work with All versions)
1. EDIT: admin/controller/common/login.php
2. FIND:
Code: Select all
if (($this->request->post) && ($this->validate())) {
$this->redirect($this->url->https('common/home'));
}
Code: Select all
// Q: Redirect to initial target
if (($this->request->post) && ($this->validate())) {
if (isset($_SERVER['HTTP_REFERER'])) {
$this->redirect($_SERVER['HTTP_REFERER']);
} else {
$this->redirect($this->url->https('common/home'));
}
}//