Jump to content

Create custom page in Prestashop


micrexc

Recommended Posts

Hi

 

I'd like to create a custom page in Prestashop without using CMS. Unfortunately I can not find any tutorials. So far I have created a test.php file in the shops root directory with following content:

<?php
include(dirname(__FILE__).'/config/config.inc.php');
include(dirname(__FILE__).'/header.php');

$smarty->display(_PS_THEME_DIR_.'test.tpl');
?>

I placed the corresponding test.tpl in my themes basefolder. It simply contains 'hello world'.

I changed the blockmenu.php and created a custom link to my page:

$this->_menu .= '<li><a href="test.php">TEST</a></li>'.PHP_EOL;

If I click the link the page is displayed but the html is some kind of corrupt. The body-id of the page is set to pagenotfound and the left column is generated but is not shown. Is there any way to set the $page_name for my custom page so that I can check if my custom page is loaded and to supress the generation of the left and right columns?

 

Is there any other way to create a functional custom page without CMS?




			
		
Link to comment
Share on other sites

×
×
  • Create New...