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(), ); ?>