How to Add a New INFORMATION page in osCommerce 2.4

By | February 22, 2013

How to add a new information page (like for example, the conditions page).

2.4 brings a new structure to osCommerce, and the base code is still being worked on – hence, this post might change when 2.4 is officially released. I’ll make sure I update it if I need to.

Step 1. Add the link to the new page in the information infobox

Open up /includes/modules/boxes/bm_information.php

Find this:

‘ <a href=”‘ . tep_href_link(‘info’, ‘contact’) . ‘”>’ . MODULE_BOXES_INFORMATION_BOX_CONTACT . ‘ </a>’ .

Change to:

‘ <a href=”‘ . tep_href_link(‘info’, ‘contact’) . ‘”>’ . MODULE_BOXES_INFORMATION_BOX_CONTACT . ‘ </a><br>’ .
‘ <a href=”‘ . tep_href_link(‘info’, ‘aboutus’) . ‘”>’ . MODULE_BOXES_INFORMATION_BOX_ABOUTUS . ‘ </a>’ .

Here we simply add a line break and a link to a new “aboutus” page.

Save the File.

Step 2. Create a new ACTION file.

Copy the code from pastebin and save into a new file called aboutus.php in the /includes/apps/info/actions/ folder.

Step 3. Create a new CONTENT file.

Copy the code from pastebin and save into a new file called aboutus.php in the /includes/apps/info/content/ folder.

Step 4. Add the necessary LANGUAGE bits

a. Open up includes/languages/english/info.php and add:

define(‘NAVBAR_TITLE_ABOUTUS’, ‘About Us’);
define(‘HEADING_TITLE_ABOUTUS’, ‘About Us’);
define(‘INFO_ABOUTUS’, ‘Put here your About Us information.’);

b. Open up includes/languages/english.php and add:

define(‘MODULE_BOXES_INFORMATION_BOX_ABOUTUS’, ‘About Us’);

Step 5. Visit your new “About Us” page

Click the “About us” link in the information infobox, and you will see your new page!

Easy as pie?

3 thoughts on “How to Add a New INFORMATION page in osCommerce 2.4

  1. Harald Ponce de Leon

    It would be easy to update the app info controller to retrieve the content from the database and be able to create/edit pages from the Administration Tool. (no more source code edits)

  2. mark

    How can I add more than 10 pages with this contribution. It seems that in the DB the number of the page_type goes only up to 9

  3. Gary

    This is how to do in osCommerce 2.4, this is not a contribution.

Leave a Reply

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