jiju ani Posted April 30, 2014 Share Posted April 30, 2014 Hi , Can anyone help me to find how the working of prestashop from its index page to theme files. Debugging to find when index file is called what happens next and which function / files are next called etc. Thanks & Regards Jiju Link to comment Share on other sites More sharing options...
gonebdg - webindoshop.com Posted April 30, 2014 Share Posted April 30, 2014 You should read Prestashop Docs > Diving into PrestaShop Core Development > Controllers To understand the working flow about how prestashop displaying a page, can be studied by creating a new page, for example create a new page "my-page" 1. Create new controller file "MyPageController.php" and placed inside /controllers/front/ contents : <?php class MyPageControllerCore extends FrontController { public $php_self = 'my-page'; public $auth = true; public $ssl = true; public function initContent() { parent::initContent(); $this->setTemplate(_PS_THEME_DIR_.'my_page.tpl'); } } 2. Create template file "my_page.tpl" and placed inside /themes/YOUR_THEME/ contents : {capture name=path}{l s='My Page'}{/capture} <h1 class="page-heading">{l s='My Page'}</h1> <div class="container"> {l s='Hello World ...'} </div> 3. Delete file /cache/class_index.php 4. Go to Back Office > Preferences > SEO & URL >> Add New Page Page : mypagecontroller (required) Page title : My Page (optional) Rewritten URL : my-page (required) 5. Finally you can view the result on your Prestashop with this URL http://YOUR_DOMAIN/index.php?controller=my-page 3 Link to comment Share on other sites More sharing options...
jiju ani Posted May 2, 2014 Author Share Posted May 2, 2014 Thank you very much, It was very helpful for me. Link to comment Share on other sites More sharing options...
ditolas Posted May 14, 2014 Share Posted May 14, 2014 how can you check if you access this page is logged? Link to comment Share on other sites More sharing options...
hunterF Posted July 23, 2014 Share Posted July 23, 2014 Hi !! I followed your steps, but when I go into the page redirects me to the page login. Why? Thanks Link to comment Share on other sites More sharing options...
hunterF Posted July 23, 2014 Share Posted July 23, 2014 Hi !! public $auth = true; // false problem solved!! Link to comment Share on other sites More sharing options...
Recommended Posts