Gaddy Posted November 18, 2012 Share Posted November 18, 2012 HEY Guys, I have a question for you which is probably asked before. Surprisingly i havent found any topic that explains what i want , or probably i am not looking at the right place. So after searching for weeks i finally decided to post this topic so that you guys will help me and guide me in the right direction. I want to create a custom page in prestashop. Its not a cms page its a normal page in the root directory of prestashop. Now i have the content that will go in the content part of the page. I just need to hook my default header and footer into this page. Also how do i get the seo for this page working? Can someone please guide me in the right direction. What i did was copy the header code(header.tpl) and then the content code(one that i want to show on the page between header and footer) and finally the footer code (footer.tpl) to a php file and it ran properly. But the hooks do not work, like the login, search bar, etc. Can someone help me regarding this? Thanking you guys in Advance. Link to comment Share on other sites More sharing options...
Gaddy Posted November 19, 2012 Author Share Posted November 19, 2012 Guys i would also like to know how prestashop loads or hooks header and footer to a page? Link to comment Share on other sites More sharing options...
AFemaleProdigy Posted November 25, 2012 Share Posted November 25, 2012 What version of PS are you using? Link to comment Share on other sites More sharing options...
Gaddy Posted November 26, 2012 Author Share Posted November 26, 2012 I am using prestashop version 1.4.7.3. Link to comment Share on other sites More sharing options...
AFemaleProdigy Posted November 28, 2012 Share Posted November 28, 2012 I believe, all you need to do is create your custom php page in the root directory, use the "include" function to load the config file, and reference the controller file that corresponds with your new page functions. The controller you referenced in your page will load the header/footer and other content via php. Take a look at the other controllers in the controller directory for examples. The controller will also reference your template file in your theme directory. That template/theme will also reference your header and footer. They all work together. And you may also need a custom class file too (class directory), depending on what you are trying to do with your page. If anyone sees an error in my explanation, please correct me. Link to comment Share on other sites More sharing options...
razaro Posted November 28, 2012 Share Posted November 28, 2012 your explanation is good, here is guide I did that contains code http://www.prestashop.com/forums/index.php?/topic/52650-how-to-add-a-custom-page/page__view__findpost__p__679541 1 Link to comment Share on other sites More sharing options...
Gaddy Posted November 29, 2012 Author Share Posted November 29, 2012 Hey guys thanks for your replies. I will read your guide and work on it. Also great explaination @"AFemaleProdigy" .. 1 Link to comment Share on other sites More sharing options...
AFemaleProdigy Posted December 5, 2012 Share Posted December 5, 2012 Good luck! Link to comment Share on other sites More sharing options...
Recommended Posts