Hello,
I have a small problem writing correrctly the code to add a new page in the sidebox Information. After, I figure out how it works, I do the following. (Note than I not really write the code, I copy it for the conditions page and modify it. That way, I had less chance to do a typo. Anyway, here is what I did:
1) In catalogue/includes/filenames.php
Add:
define('FILENAME_ABOUT_US', 'about_us');
define('FILENAME_DEFINE_ABOUT_US', 'define_about_us');
2) In catalogue / includes / modules / pages /
I create a folder about_us and a file header_php.php
3) In catalogue/includes/modules/pages/about_us/header_php.php (My new created file)
Write:
<?php
/**
* About us Page
*
* @package page
* @copyright Copyright 2003-2006 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: header_php.php 3230 2006-03-20 23:21:29Z drbyte $
*/
require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php'));
// include template specific file name defines
$define_page = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/html_includes/', FILENAME_DEFINE_ABOUT_US, 'false');
$breadcrumb->add(NAVBAR_TITLE);
?>
4) In catalogue/includes/modules/sideboxes/information.php
Add:
if (DEFINE_ABOUT_US_STATUS <= 1) {
$information[] = '<a href="' . zen_href_link(FILENAME_ABOUT_US) . '">' . BOX_INFORMATION_ABOUT_US. '</a>';
}
5) In catalogue / includes / templates / template_default / templates /,
I create a new file : tpl_about_us_default.php
6) In this file, I wrote down:
<?php
/**
* Page Template
*
* Loaded automatically by index.php?main_page=about_us.<br />
* Displays conditions page.
*
* @package templateSystem
* @copyright Copyright 2003-2005 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: tpl_conditions_default.php 3464 2006-04-19 00:07:26Z ajeh $
*/
?>
<div class="centerColumn" id="about_us">
<h1 id="conditionsHeading"><?php echo HEADING_TITLE; ?></h1>
<?php if (DEFINE_ABOUT_US_STATUS >= 1) { ?>
<div id="about_usMainContent" class="content">
<?php
/**
* require the html_define for the about_us page See modules/pages/about_us/header_php.php
*/
require($define_page);
?>
</div>
<?php } ?>
<div class="buttonRow back"><?php echo zen_back_link() . zen_image_button(BUTTON_IMAGE_BACK, BUTTON_BACK_ALT) . '</a>'; ?></div>
</div>
Now, I go on language section.
7) In : catalogue/includes/languages/english.php, I write
// information box text in sideboxes/information.php
define('BOX_HEADING_INFORMATION', 'Informations');
define('BOX_INFORMATION_ABOUT_US', 'The Company');
8) In catalogue / includes / languages / english/, I add : about_us.php
9) In catalogue / includes / languages / english/about_us.php
I write :
<?php
/*
about_us.php
*/
define('NAVBAR_TITLE', 'FDMT');
define('HEADING_TITLE', 'The Company');
define('TEXT_INFORMATION', '
');
?>
10) In catalogue / includes / languages / english / html_includes / I add : define_about_us.php
11) in catalogue / includes / languages / english / html_includes / define_about_us.php
I wrote :
<P>My text in html form </P>
**********
Now, when I click on the link The company in the sidebox Informations, it opens an about_us page in which I have the NAVBAR_TiTLE and the HEADING_TITLE (not the constante but the variable) and the button Previous but I'm unable to see the texte in the define_about_us.php page.
Is anybody able to tell me why ?
Thanks in advance



