Search
 
SCRIPT & CODE EXAMPLE
 

PHP

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');
  }
}
Comment

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');
}
Comment

PREVIOUS NEXT
Code Example
Php :: omnipay refund 
Php :: How can I share limits across multiple fields gravity forms? 
Php :: required if null / require without laravel 
Php :: file viewer codeigniter 
Php :: curl upload image huawei 
Php :: mail php send 
Php :: eloquent search from child table column 
Php :: how to change directory in command processor 
Php :: Display a variable containing html in laravel 
Php :: redaxo urlgenerator 
Php :: openclassroom php 
Php :: php questions in tasks 
Php :: Debloat Wordpress 
Php :: themeHeader 
Php :: php ussd 
Php :: laravel easy form 
Php :: downgrade php PHP 8.0.11 to 7.4 on windows 
Php :: como leer archivos .env php 
Php :: function() use() php clousure examples 
Php :: remove public url laravel 
Php :: twiml gather php 
Php :: how do istart writing a php code 
Php :: php get image from folder as array 
Php :: How do I test a website using XAMPP? 
Php :: yajra add column 
Php :: how to get data from laravel api 
Php :: apache/2.4.52 (win64) openssl/1.1.1m php/8.1.2 server at localhost port 80 
Php :: how to install mysql and phpmyadmin on windows 10 
Php :: php abstract class static method 
Php :: how to save array of inputs in php 
ADD CONTENT
Topic
Content
Source link
Name
4+8 =