usasat Posted June 10, 2016 Share Posted June 10, 2016 (edited) This code works perfectly on 1.6.1.4 but not on 1.6.1.5 also works on previews versos. I cannot fine a reason why it does not work on this new version. I created a new module using this code: listproductscontrollersfrontlist.php viewstemplatesfrontlist.tpl listproduct.php logo.png listproducts/listproducts.php <?phpif (!defined('_PS_VERSION_')) exit;class Listproducts extends Module{ public function __construct() { $this->name = 'listproducts'; $this->tab = 'front_office_features'; $this->version = '1.0.0'; $this->author = 'Vipul Hadiya'; $this->controllers = array('list'); $this->bootstrap = true; parent::__construct(); $this->displayName = $this->l('List Products'); $this->description = $this->l('List all the product in front page.'); $this->confirmUninstall = $this->l('Are you sure about removing these details?'); } public function install() { if (!parent::install() || !$this->registerHook('backOfficeHeader')) return false; return true; } public function uninstall() { if (!$this->unregisterHook('backOfficeHeader') || !parent::uninstall()) return false; return true; } public function hookBackOfficeHeader() { if(!Tools::getIsset('configure') || Tools::getValue('configure') != $this->name) return; $this->context->controller->addCSS(array()); $this->context->controller->addJquery(); $this->context->controller->addJS(array()); } public function getContent() { $this->context->smarty->assign(array()); return $this->display(__FILE__, 'views/templates/admin/configure.tpl'); }} listproducts/controllers/front/list.php <?phpclass listproductsListModuleFrontController extends ModuleFrontController{ public $ssl = true; public function __construct() { parent::__construct(); $this->context = Context::getContext(); } public function initContent() { parent::initContent(); $this->context->smarty->assign(array()); $this->setTemplate('list.tpl'); } public function setMedia() { parent::setMedia(); $this->addjQuery(); }} listproducts/views/front/list.tpl <h3> Some HTML content to show on page</h3> Please Help! Edited June 10, 2016 by usasat (see edit history) Link to comment Share on other sites More sharing options...
bellini13 Posted June 10, 2016 Share Posted June 10, 2016 how are you viewing the front page? what URL are you using? what are you seeing if not "Some HTML content to show on page" did you enable debug mode to check if there are any errors occurring... Link to comment Share on other sites More sharing options...
usasat Posted June 10, 2016 Author Share Posted June 10, 2016 (edited) Thank you for your help: I use this link: /module/listproducts/list. http://www.usasat.net/presta/module/listproducts/list I see: This page is not available We're sorry, but the Web address you've entered is no longer available. No, I did not turn the debug mode, I will try to do that now. Edited June 10, 2016 by usasat (see edit history) Link to comment Share on other sites More sharing options...
bellini13 Posted June 13, 2016 Share Posted June 13, 2016 in the back office SEO and URL page, did you add a new page for this module list 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