newbie_presta19 Posted June 24, 2015 Share Posted June 24, 2015 Hello ! I'm newbie in prestashopI want to make new page without cms. Now I have problem, the page can't show only white page. Can some one help me ? Thanks root/overide/classes/controller/FrontController.php <?php class FrontController extends FrontControllerCore { public function init() { parent::init(); $this->context->smarty->assign(currentController', get_class($this)); } } ?> root/testpage.php <?php require(dirname(__FILE__).'/config/config.inc.php'); Tools::displayFileAsDeprecated(); Tools::redirect('index.php?controller=testpage'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); ?> root/themes/default-boostrap/testpage.tpl {include file="$tpl_dir./breadcrumb.tpl"} {include file="$tpl_dir./errors.tpl"} <h1>Testpage</h1> controller: {$currentController} <!-- Should be : TestpageController --> root/controllers/front/TestpageController.php <?php class TestpageControllerCore extends FrontController { public $php_self = 'testpage'; public function initContent() { parent::initContent(); $this->setTemplate(_PS_THEME_DIR_.'testpage.tpl'); } } ?> SEO/URL - new page -page : testpage title Testpage friendly-url :testpage Link to comment Share on other sites More sharing options...
prestatent Posted June 24, 2015 Share Posted June 24, 2015 Hi Best way to do this is to create a new module. I recently did this and used this tutorial: http://doc.prestashop.com/display/PS16/Creating+a+PrestaShop+Module This worked really well and also gave me a better understanding of how PS works. There are other tutorials by Nemo which are also very good here: https://www.prestashop.com/forums/topic/194700-free-tutorial-series-prestashop-101/ Link to comment Share on other sites More sharing options...
razaro Posted June 24, 2015 Share Posted June 24, 2015 Yeah you have more control with module and Nemo's tutorial is great starting point combining with official docs. But other way you tried should work also. You do not need testpage.php in root if you using latest version of Prestashop. Try to clear cahe in Advanced Preferences > Performance in back office and also if you have white page try to enable debug mode. https://www.prestashop.com/forums/topic/224525-how-to-turn-on-error-reporting-for-debug-information-blank-page-500-internal-server-error/ Link to comment Share on other sites More sharing options...
bellini13 Posted June 24, 2015 Share Posted June 24, 2015 enable debug mode on your store so that you will see an error message instead of a blank white page. 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