BBR Posted October 5, 2018 Share Posted October 5, 2018 (edited) Hi everyone, Im trying to do a module front controller to display some content in a page on prestashop 1.7; I've follow many methods but all i have is a 404 error when im trying to display the page "http://localhost:8090/prestashop/module/monmodule/controller". I've disabled the cache on my prestashop. This is my module code: <?php if (!defined('_PS_VERSION_')) { exit; } class monmodule extends Module { public function __construct() { $this->name = 'monmodule'; $this->tab = 'front_office_features'; $this->version = '1.0.0'; $this->author = 'BBR'; $this->need_instance = 0; $this->ps_versions_compliancy = array('min' => '1.6', 'max' => _PS_VERSION_); $this->bootstrap = true; parent::__construct(); $this->displayName = $this->l('Mon module'); $this->description = $this->l('Description of my module.'); $this->confirmUninstall = $this->l('Are you sure you want to uninstall?'); if (!Configuration::get('MONMODULE')) $this->warning = $this->l('No name provided'); } public function install() { if (!parent::install()) return false; return true; } public function uninstall() { if (!parent::uninstall()) return false; return true; } } This is my controller.php <?php class monmoduleControllerModuleFrontController extends ModuleFrontController { public function __construct(); $this->context = Context::getContext(); } public function initContent() { parent::initContent(); $this->context->smarty->assign(arrray()); $this->setTemplate('Controller.tpl'); } } ?> and my controller.tpl {extends file='controller.tpl'} {block name='content'} test {/block} I would like to know where are my mistakes here, thank you guys Edited October 5, 2018 by BBR (see edit history) Link to comment Share on other sites More sharing options...
OctagonMD Posted February 28, 2019 Share Posted February 28, 2019 Hi, Did you manage to fix your error? If so would you mind sharing the solution? 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