Hello,
I want to force user to login first accessing any information page.
Thanks in advance.
MD
I want to force user to login first accessing any information page.
Thanks in advance.
MD
You mean to force users to login before accessing the information page or force to login by forcing redirection to the information page? Please clarify your enquiry.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
I would not suggest this approach in case of an opened case by a customer toward a payment provide regarding a complaint and more information about your Business would need to be obtained. With enforced restrictions, this could create political issues. However, in your catalog/controller/information/information.php file, you can find:
add right above:
Again, not a suggested method to entirely restrict information pages if some of them describes the goal of your Business.
Code: Select all
$this->load->language('information/information');
Code: Select all
if (!$this->customer->isLogged()) {
$this->session->data['redirect'] = $this->url->link('account/account', '', true);
$this->response->redirect($this->url->link('account/login', '', true));
}
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Dear Gent,
Thanks for your reply and your code is working perfectly for my project.
Thanks again.
Regards,
MD
Thanks for your reply and your code is working perfectly for my project.
Thanks again.
Regards,
MD
Who is online
Users browsing this forum: No registered users and 21 guests