Jump to content

How to change the Homepage (Index Page) of Presta Shop ?


Recommended Posts

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 by RootWebMaster (see edit history)
Link to comment
Share on other sites

Hi,

IndexCоntrоller  is a controller that is responsible for generating a homepage. /controllers/front/IndexController.php
most 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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...