How To Add A New Link (Page_1 is used in the example below) To The MORE INFORMATION sidebox in Zen Cart.

Link / Text Can Be Turned ON/OFF In: ADMIN/CONFIGURATION/DEFINE PAGE STATUS
Link Can Be Edited In: ADMIN/TOOLS/DEFINE PAGES EDITOR

Thanks to tactician for posting this in the Zen Cart forums

Edit …includes/filenames.php
Insert

define('FILENAME_DEFINE_PAGE_1', 'define_page_1');

above Line:

define('FILENAME_DEFINE_PAGE_2', 'define_page_2');

Insert

define('FILENAME_PAGE_1', 'page_1');

above Line:

define('FILENAME_PAGE_2', 'page_2');

Edit …includes/languages/YOUR_TEMPLATE/english.php

Insert

define('BOX_INFORMATION_PAGE_1', 'Page 1');

above Line:

define('BOX_INFORMATION_PAGE_2', 'Page 2');

Edit …includes/languages/english.php
Insert

define('BOX_INFORMATION_PAGE_1', 'Page 1')

above Line:

define('BOX_INFORMATION_PAGE_2', 'Page 2');

Copy and Rename …includes/languages/english/page_2.php
To: page_1.php
Edit page_1.php
Edit line #19 to read:

// $Id: page_1.php 1969 2005-09-13 06:57:21Z drbyte $

Create an /includes/modules/pages/page_1/ directory.
Copy and Paste the /includes/modules/pages/page_2/header_php.php file to the
/includes/modules/pages/page_1/ directory.
Edit line #14: of the the /includes/modules/pages/page_1/header_php.php file to read:

$define_page = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/html_includes/',
FILENAME_DEFINE_PAGE_1, 'false');

Edit …includes/modules/sideboxes/more_information.php
Add the line:

if (DEFINE_PAGE_1_STATUS <= 1) {
$more_information[] = '<a href="' . zen_href_link(FILENAME_PAGE_1) . '">' .
BOX_INFORMATION_PAGE_1 . '</a>';
}

Above the line below:

if (DEFINE_PAGE_2_STATUS <= 1) {
$more_information[] = '<a href="' . zen_href_link(FILENAME_PAGE_2) . '">' .
BOX_INFORMATION_PAGE_2 . '</a>';
}

Copy and Rename …includes/templates/template_default/templates/tpl_page_2_default.php
To: tpl_page_1_default.php
Edit tpl_page_1_default.php
Edit each line to read as follows:
Line #2 :

* tpl_page_1_default.php

Line #8 :

* @version $Id: tpl_page_1_default.php 3464 2006-04-19 00:07:26Z ajeh $

Line #14 :

<?php if (DEFINE_PAGE_1_STATUS >= 1 and DEFINE_PAGE_1_STATUS <= 2) { ?>

Line #18 :

* load the html_define for the page_1 default

Edit …includes/templates/template_default/templates/tpl_site_map_default.php

Add the line:

<?php } ?>
<?php if (DEFINE_PAGE_1_STATUS <= '1') { ?>
<li><?php echo '<a href="' . zen_href_link(FILENAME_PAGE_1) . '">' .
BOX_INFORMATION_PAGE_1 . '</a>'; ?></li>

Above the line below:

<?php } ?>
<?php if (DEFINE_PAGE_2_STATUS <= '1') { ?>
<li><?php echo '<a href="' . zen_href_link(FILENAME_PAGE_2) . '">' .
BOX_INFORMATION_PAGE_2 . '</a>'; ?></li>

Edit …admin/includes/languages/english.php
Add the line:

define('BOX_TOOLS_DEFINE_PAGE_1','Page 1');

Above the line below:

define('BOX_TOOLS_DEFINE_PAGE_2','Page 2');

Edit …admin/includes/languages/english/define_pages_editor.php
Add the line:

define('TEXT_INFO_PAGE_1', 'Page 1');

Above the line below:

define('TEXT_INFO_PAGE_2', 'Page 2');

Copy and Rename …includes/languages/english/html_includes/define_page_2.php
To define_page_1.php
Edit define_page_1.php in Notepad.
Change Page 2 Sample Text … to Page 1 Sample Text …
Save. Upload it to …/includes/languages/english/html_includes/ folder.

Login To The Admin Control Panel
Go to Tools / Install SQL Patches.
Copy and Paste The Following Into The Large Text Box:

INSERT INTO `configuration` ( `configuration_title`, `configuration_key`, `configuration_value`,
`configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`,
`set_function`)
VALUES ('Define Page_1', 'DEFINE_PAGE_1_STATUS', '1', 'Enable the Defined Page 1 Link/Text?<br />0=
Link ON, Define Text OFF<br />1= Link ON, Define Text ON<br />2= Link OFF, Define Text ON<br />3= Link
OFF, Define Text OFF', 25, 100, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''0'', ''1'', ''2'', ''3''),');

That’s all, you are done.

Leave a Reply

Your email address will not be published. Required fields are marked *

Design by FtroopDad Theme by itx