Create a new page in osCommerce + STS

March 7, 2007 by hejian

1. Create newpage.php
Copy the following files:

shipping.php
includes/languages/shipping.php

To:

newpage.php
includes/languages/newpage.php

2. Edit newpage.php
Change:

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_SHIPPING);

To:

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_NEWPAGE);

Change:

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_SHIPPING, '', 'NONSSL'));

To:

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_NEWPAGE, '', 'NONSSL'));

Change:

define('NAVBAR_TITLE', 'Shipping & Returns');
define('HEADING_TITLE', 'Shipping & Returns');

To:

define('NAVBAR_TITLE', 'Newpage Template');
define('HEADING_TITLE', 'Newpage Template');

3. Edit filenames.php
Add the following line of code to includes/filenames.php:

define('FILENAME_NEW_PAGE', 'newpage.php');

4. Edit sts_user_code.php
Add the following lines to your includes/modules/sts_inc/sts_user_code.php:

$sts->template['urlmynewpage'] = tep_href_link(FILENAME_NEWPAGE, ”, ‘SSL’);
$sts->template['newpage'] = ‘<a href=’ . $sts->template['urlmynewpage'] . ‘ class=”headerNavigation”>’ . ‘New Page’ . ‘</a>’;

Leave a Reply

You must be logged in to post a comment.

Wordpress template made by HeJian