RootWebMaster Posted December 8, 2016 Share Posted December 8, 2016 (edited) I have installed the Prestashop version 1.6, which has the Index page of All Products. (I have installed Presta Shop in my root DIR) eg: www.example.com/index.php On Index.php I am able to see the page of New Products, Bestseller etc. But If I want the user to see Login page first can I change the Index.php ??? If yes, please tell me how to achieve this? I am a newbie just exploring presta shop Any help will be appreciated. Thank you in advance Rohan.S Edited December 8, 2016 by RootWebMaster (see edit history) Link to comment Share on other sites More sharing options...
Rhobur Posted December 10, 2016 Share Posted December 10, 2016 if you're comfortable with editing code you could add to the initContent method of the IndexController the following: Tools::redirect('xxxxxxx'); Of course, overriding the method would be better. Link to comment Share on other sites More sharing options...
Jignesh.aakoliya Posted December 13, 2016 Share Posted December 13, 2016 Hi,IndexCоntrоller is a controller that is responsible for generating a homepage. /controllers/front/IndexController.phpmost controllers used in the front end, it is inherited from the FrоntCоntrоller class, delivering only the method initCоntent. public function initContent() { parent::initContent(); $this->context->smarty- >assign('HOOK_HOME', Hook::exec('displayHome')); $this- >setTemplate(_PS_THEME_DIR_.'index.tpl'); } It is exactly in this method where the hook displаyHоme is called and the template that is responsible for the content output is defined. 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