u1050411 Posted July 5, 2015 Share Posted July 5, 2015 Hola a ver , he seguido todos estos pasos 1. Create new controller file "MyPageController.php" and placed inside /controllers/front/ contents : <?phpclass 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 Pero siempre me sale el mismo error THIS PAGE IS NOT AVAILABLEWE'RE SORRY, BUT THE WEB ADDRESS YOU'VE ENTERED IS NO LONGER AVAILABLE. Que narices hago ?? Link to comment Share on other sites More sharing options...
ventura Posted July 5, 2015 Share Posted July 5, 2015 Tienes las urls amigables activadas ¿?. Si es asi tienes que acceder a la nueva pagina asi http://YOUR_DOMAIN/nombre-pagina Con el nombre que le hayas puesto desde Preferencias / SEO Link to comment Share on other sites More sharing options...
u1050411 Posted July 6, 2015 Author Share Posted July 6, 2015 Ya lo he provado , con la uls amigables puestas y http://YOUR_DOMAIN/nombre-pagina o sin ellas y http://YOUR_DOMAIN/index.php?controller=my-page Link to comment Share on other sites More sharing options...
u1050411 Posted July 6, 2015 Author Share Posted July 6, 2015 Solucionado El problema es que en lugar de llamar al archivo MyPageController.php lo llamaba igual que la clase que lleva MyPageControllerCore.php 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