The most complex scenario : zen cart module / add on must have two parts: front end user and admin area

1. Admin area

a) To have a new main menu on horizontal bar:
- edit and change based on your requirements: admin/alt_nav.php and admin/includes/header_navigation.php
- add in admin/boxes an entry based on your requirements (and what you have added into above two files).

b) To add a new option to an existing main menu you must add your new “add on” / php files in the following folders:
- admin/includes/extra_datafile (here you will tell where is the php file which contain code of ypur new stuff)
- admin/includes/boxes/extraboxes (here you will create the option menu under teh choosen main option menu)
- admin/includes/languages/english/extra_definition (here are all “defines” used into your new add on.

c) Create main file mentioned in admin/includes/extra_datafile. Usually it is located under /admin/
2. User area

2.1 You are going to create a page or many pages (not boxes)
a) define your file(s) in includes/filenames.php

b) add your file(s) name (.php) in includes/languages/english folder

c) add your template into includes/templates/your_custom_template/templates/

d) create a folder under includes/modues/pages/ with at least 2 files: header_php.php and on_load_main.js

Notes
If you add table into database then edit and change includes/database_tables.php
page where you can check if the system respond to your changes is : includes/templates/your_custom_template/common/main_templates_vars.php

Example:

You will have a module name OlalaModule under Tools main Option Menu

a) create a file : admin/languages/english/extra_definition/olalamodule.php

with the following content:

define(‘BOX_OLALAMODULE’, OlalaModule Manager’);
define(‘
OLALAMODULE_HEADING_TITLE’, ‘OlalaModule Manager’);

b) create a file : admin/includes/boxes/extraboxes/olalamodule_tools_dhtml.php

with the following content:

if (!defined(‘IS_ADMIN_FLAG’)) {
die(‘Illegal Access’);
}
$za_contents[] = array(‘text’ => BOX_APOLLOCLUB, ‘link’ => zen_href_link(FILENAME_APOLLOCLUB, ”, ‘NONSSL’));

c) create a file : admin/includes/extra_datafile/olala_olalamodule.php

with the following content:

define(‘FILENAME_OLALAMODULE‘, ‘olala_apolloclub.php’);
define(‘TABLE_HEADING_OLALAMODULE‘, ‘Apollo Club’);

d) create main file from  where something will be displayed when an admin select OlalaModule under Tools main Option Menu

This file is /admin/olalamodule.php

As basic content must have:

require(‘includes/application_top.php’);
require(DIR_WS_CLASSES . ‘currencies.php’);
$currencies = new currencies();

//$action = (isset($_GET['action']) ? $_GET['action'] : ”);
//$customers_id = zen_db_prepare_input($_GET['cID']);

$error = false;
$processed = false;

?>
<!doctype html public “-//W3C//DTD HTML 4.01 Transitional//EN”>
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=<?php echo CHARSET; ?>”>
<title><?php echo TITLE; ?></title>
<link rel=”stylesheet” type=”text/css” href=”includes/stylesheet.css”>
<link rel=”stylesheet” type=”text/css” href=”includes/stylesheet_warranty.css”>
<link rel=”stylesheet” type=”text/css” href=”includes/cssjsmenuhover.css” media=”all” id=”hoverJS”>
<script language=”javascript” src=”includes/menu.js”></script>
<script language=”javascript” src=”includes/general.js”></script>

YOUR JAVASCRIPT  and  STYLESHEET HERE

</head>

<body onLoad=”init()”>
<!– header //–>
<?php require(DIR_WS_INCLUDES . ‘header.php’); ?>
<!– header_eof //–>

<!– OLALAMODULE begin –>
<?php

echo ” YOUR PHP CODE HERE”

?>
<!–
OLALAMODULE End –>

<!– body //–>
<table border=”0″ width=”100%” cellspacing=”2″ cellpadding=”2″>
<tr>
<!– body_text //–>
<td width=”100%” valign=”top”>
<table border=”0″ width=”675″ cellspacing=”0″ cellpadding=”2″>
<tr>
<td style=”border:1px solid #DDEEFF;”>

<!– OLALAMODULE Begin –>

YOUR HTML CODE HERE

<!– OLALAMODULE End –>
</td>
</tr>
</table>
</td>

<td width=”5″ valign=”top”>&nbsp;

</td>
<!– body_text_eof //–>
</tr>
</table>
<!– body_eof //–>

<!– footer //–>
<?php require(DIR_WS_INCLUDES . ‘footer.php’); ?>
<!– footer_eof //–>
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . ‘application_bottom.php’); ?>