Documentation
Project Links
Let’s jump right in. The files involved are: /catalog/includes:
/catalog/includes/boxes: ALL files in this directory
require(DIR_WS_BOXES . 'test.php');directly below this line:
require(DIR_WS_BOXES . 'information.php');
The next step is to customize that box, and to do it, we need to modify a few more files. I want to change the title bar of our new box, as well as make links to new, custom pages that I will also create. This process is a bit more clunky than it should be, but we will have to make due. Here we go!
In the file /catalog/includes/filenames.php, find the section marked define filenames used in the project. In this section, copy any one of the file definitions, and paste it to a new line, just after the one you copied. Now you need to modify the newly pasted line to point to testpage1 See the example below:
Copy the first file definition listed:
define('FILENAME_ACCOUNT', 'account.php');
Then paste this on a new line immediately following it, four times. Create four new define statements as follows:
define('FILENAME_TESTPAGE1', 'testpage1.php');
define('FILENAME_TESTPAGE2', 'testpage2.php');
define('FILENAME_TESTPAGE3', 'testpage3.php');
define('FILENAME_TESTPAGE4', 'testpage4.php');
Next, in the file /catalog/includes/languages/english.php, find the section marked information box text. Copy the entire section and paste it below the original section.
Change the section to look like this:
// information box text in includes/boxes/test.php
define('BOX_HEADING_TEST', 'Test Box');
define('BOX_TEST_LINK1', 'Test Link 1');
define('BOX_TEST_LINK2', 'Test Link 2');
define('BOX_TEST_LINK3', 'Test Link 3');
define('BOX_TEST_LINK4', 'Test Link 4');
Save /catalog/includes/languages/english.php. This step creates the link text that will go into each new link you create.
In the file /catalog/includes/languages/english/shipping.php edit the following:
define('NAVBAR_TITLE', 'Shipping & Returns');
define('HEADING_TITLE', 'Shipping & Returns');
define('TEXT_INFORMATION', 'Enter your shipping info here');
To look like this:
define('NAVBAR_TITLE', 'Test Page 1');
define('HEADING_TITLE', 'Test Page 1');
define('TEXT_INFORMATION', 'This is an added sample page');
In the file: /catalog/shipping.php using the replace feature of you text editor
Finally, edit the file /catalog/includes/boxes/test.php to look like this:
<?php
$boxHeading = BOX_HEADING_TEST;
$corner_left = 'square';
$corner_right = 'square';
$boxContent = ('<a href="' . tep_href_link (FILENAME_TESTPAGE1, '', 'NONSSL') . '">' . BOX_TEST_LINK1 . '</a><br>' .
'<a href="' . tep_href_link (FILENAME_TESTPAGE2, '', 'NONSSL') . '">' . BOX_TEST_LINK2 . '</a><br>' .
'<a href="' . tep_href_link (FILENAME_TESTPAGE3, '', 'NONSSL') . '">' . BOX_TEST_LINK3 . '</a><br>' .
'<a href="' . tep_href_link (FILENAME_TESTPAGE4, '', 'NONSSL') . '">' . BOX_TEST_LINK4 . '</a>');
require(DIR_WS_TEMPLATES . TEMPLATENAME_BOX);
?>