Walter Posted October 31, 2017 Share Posted October 31, 2017 How do I change the redirection url of logging into the admin login page? For example, logging into admin page redirects me to the Orders page instead of the Dashboard. Thanks in advance Link to comment Share on other sites More sharing options...
gonebdg - webindoshop.com Posted November 1, 2017 Share Posted November 1, 2017 Just edit your employee profile, scroll to "default page" field option and select admin page as you wish. This question has no relation with 'core developer' and will be moved to 'general' topic 1 Link to comment Share on other sites More sharing options...
Walter Posted November 2, 2017 Share Posted November 2, 2017 Thanks. Another question, if I were to set the default page to a custom module's page, what should I do? The dropdown did not show options for it... Link to comment Share on other sites More sharing options...
gonebdg - webindoshop.com Posted November 2, 2017 Share Posted November 2, 2017 You can set default page to "Modules" but you cannot redirect to specific module configuration page. You can also set default page to specific "Admin Module Page" if it already registered as an Admin Menu. If you still wanna set default page to specific module configuration page, then you must do several changes as follow : create module admin controller file simply with just a __construct() method and add redirection inside it <?php class Admin[REPLACE_WITH_MODULE_NAME]ConfigController extends ModuleAdminController { public function __construct() { parent::__construct(); Tools::redirectAdmin( $this->context->link->getAdminLink('AdminModules'). '&module_name=[replace_with_module_name]&configure=[replace_with_module_name]' ); } } create new Admin Menu pointing to the newly created module controller (Admin > Administration > Menu) Name: "as you wish" Class : "Admin[REPLACE_WITH_MODULE_NAME]ConfigController" Module : "real_module_name" Status : YES Parent: Home edit your admin profile you will see the new Admin Menu on the dropdown of "Default Page" field option select the newly created menu as your default page Link to comment Share on other sites More sharing options...
Walter Posted November 2, 2017 Share Posted November 2, 2017 It works. Thanks! However, what I did was just by specifying the target module's controller name in the method below instead of 'AdminModules'. Tools::redirectAdmin( $this->context->link->getAdminLink('Admin[Module Name]'). ); Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now