Answers for "prestashop category as homepage"

PHP
0

prestashop category as homepage

/* 
 * Better way with overide
 * 1. Create file override/controllers/front/IndexController.php
 * 2. Insert code
 * 3. Remove file cache/class_index.php
 */
class IndexControllerCore extends FrontController {
  public function initContent() {
  	Tools::redirect('index.php?id_category=3&controller=category');
  }
}
Posted by: Guest on October-06-2020
0

prestashop category as homepage

/* Quick and dirty
 * in file Controllers/IndexController.php
 */
public function initContent() {
   parent::initContent();
   Tools::redirect('index.php?id_category=10&controller=category');
   $this->context->smarty->assign('HOOK_HOME', Hook::exec('displayHome'));
   $this->setTemplate(_PS_THEME_DIR_.'index.tpl');
}
Posted by: Guest on October-06-2020

Code answers related to "prestashop category as homepage"

Browse Popular Code Answers by Language