GONGOTA Posted July 7, 2014 Share Posted July 7, 2014 Following this official guide <a href="http://doc.prestashop.com/display/PS15/Creating+a+PrestaShop+module">Guide</a> create display.php and add 'module_link' => $this->context->link->getModuleLink('nmo', 'display') this in my module code.But when trying to open link http://mydomain.com/ru/module/nmo/display it's 404 also tryed mydomain.com/modules/nmo/display.php (505) and mydomain.com/ru/index.php?module=nmo&controller=display (505) Error from log: Fatal error: Class 'display' not found in /www/mydomain.com/classes/controller/Controller.php on line 135 Also tried solutions from this topic http://www.prestashop.com/forums/topic/290064-solved-link-not-working-creating-a-prestashop-15-module/ Generally this: Ok, solved. There is an error in the official guide, where it saysLet's create the display.php file that it targets, with a minimal content, and put it in the module's root folder.If you put display.php in the module's root folder, you will have "page not found" error like me. After some rows, the guide says:Let's explore display.php, our first PrestaShop front-end controller, stored in the /controllers/front folder of the module's main folder:If you put display.php in /controllers/front, this will work! Maybe that is a section of the old version (1.4) of the guide that nobody has removed. Furthermore, it's not specified where I should put the template file, but trying, I found that it has to be put in /views/templates/front It would be good to modify the guide to teach the right steps Thanks anyway for help! Any ideas? Link to comment Share on other sites More sharing options...
GONGOTA Posted July 7, 2014 Author Share Posted July 7, 2014 Solved! Just move display.php from /controllers/front to /modules/module_name/controllers/front and all works fine! Tpl file should be in /modules/module_name/views/templates/front/ 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