prestashop :- Creating new front end page for your prestashop within module

Prestashop provide the way to make entire new page through your module. For this you must follow directory structures

Some step given bellow to make new page

Step 1 – Creating the correct folder structure

Create a module and install it (for how we create module you can saw the previous blog )

let your module name is testmodule then after installation you can check module folder where you get testmodule folder

Directory structure is

  • module=>your module name
  • controllers=>front=> your file name

that means directory structure is 

"module/modulename/controllers/front/filename"

 

in my case file name is test.php

Step 2 – Adding the new page’s controller

<?php

if (!defined('_PS_VERSION_'))
		exit;
include('../../config/config.inc.php');
class modulenameTestModuleFrontController extends 
ModuleFrontController	{

	public function initContent() {

			global $smarty;	
		parent::initContent();
		include('../../header.php');
		include(dirname(__FILE__).'/../../footer.php');
	}

}

?>

your class name as

modulename is your module name.

then add your file name in my case my file name is test then i am adding “Test” and then add ModuleFrontController and extends ModuleFrontController

 

now open this link to any browser

index.php?fc=module&module=modulename&controller=test

 

. . .

Comment

Add Your Comment

Be the first to comment.

css.php
Hire Us!
Brief us about your requirements and we'll get back to you.
Woo! Hooy!
We have just recieved your project brief and our expert will contact you shortly.
Send Again
Close