/
Main driver file for extension

Main driver file for extension

This is a main file that gets processed every time extension is loaded. It is used to include files used by given extension, define extension resources and do other initial routines.
There are 4 types of resources that extension can use

  • controllers
  • languages
  • models
  • template files

Each resource can be in 2 sections – admin & storefront.

Controllers, languages and models defined as catalog/product
Templates defined with .tpl extension – catalog/product.tpl

example
<?php
if ( !defined ( 'DIR_CORE' )) {
	header ( 'Location: static_pages/' );
}
include('core/template2.php');
include('core/template2_pagination.php');

$languages = array(
  	'storefront' => array(
	  'template2/template2',
  	),
  	'admin' => array(
	    	'template2/template2',
  	),
);
$templates = array(
  	'storefront' => array(
	  'common/head.tpl',
	  'common/header.tpl',
	  'common/footer.tpl',
  	),
  	'admin' => array(),
);
?>


Related content

Files and directory structure
Files and directory structure
More like this
Extension Process Overview
Extension Process Overview
More like this
Templates Overview
Templates Overview
More like this
Architecture Overview
Architecture Overview
More like this
Extension’s Developer Guide
Extension’s Developer Guide
More like this
Extension concept in AbanteCart
Extension concept in AbanteCart
More like this