Web Design Tutorials osCommerce Template Tutorials
New osCommerce Templates osCommerce Specials osCommerce Forums Search Our Site Contact Us Resources Web Design Tutorials
Web Designers Library- Tutorials and Articles
Tutorial Search
  Advanced Search
 
Tutorial Menu
 
 Video Tutorials
  · Dreamweaver
  · osCommerce
  · Installations
 
 Photoshop
  · Tutorials
  Photoshop Basics
  Special Effects
  Text Effects
  3D Effects
  Textures & Patterns
  Web Layout
  Drawing Techniques
  Color Management
  Photo Editing
  ImageReady Animation
  Miscellaneous
  · Articles
 
 Web Design Basics
  · Design Principles
  · Website Usability
  · Color Theory
  · Templates & Tuning
 
 osCommerce
  · osCommerce Knowledgebase
  Catalog Area
  Installation and Upgrades
  Administration Tool
  General Information
  Developers Section
What's New
Latest Tutorials and Articles
Video Tutorials
osCommerce Tutorials
Template installation with cPanel and Ipswitch
Photoshop
Photoshop CS3: Output Sharpening
Change Color on an Object
Sunlight Effect
Autumn Effect
Eyes in Green Pea Pod
Web Design Basics
A To Z About RSS
Elements of Great Websites
The Next Generation Website Model
Why Use a Web Design Template?
Web Site Templates and Their Benefits
osCommerce
SSL - This page contains secure and non secure items
Post-Installation
Security - .htaccess
SSL - This page contains secure and non secure items
Tax Proposal
osCommerce : osCommerce Knowledgebase : Catalog Area Last Updated: Apr 15th, 2008 - 18:38:37


Add Box Page
Author: oscommerce.info
Authors Website: oscommerce.info
Oct 21, 2006, 20:52

Email this article
 Printer friendly page
Introduction

Adding an additional box page gives the store owner more flexibility for new pages in their store under the different named boxes.
Add Box Pages

Adding a page or pages to one of the default boxes or a
new box that you have made allows you to add more information easily to your site. Our example box will be the includes/boxes/information.php box.

Five files are necessary to change to add more pages to your box. These files can be altered for an already displayed box or a new box.

Files to change are:

catalog/shipping.php
catalog/includes/filenames.php
catalog/includes/languages/english.php
catalog/includes/languages/english/shipping.php
catalog/includes/boxes/information.php

Open the catalog/shipping.php page in your favorite editor and save it as another name, for instance, about_us.php.

In the new about_us.php file that you have just made change the following require and $breadcrumb filenames to the ABOUT_US name of your new file.

/*
$Id: about_us.php,v 1.21 2003/02/13 04:23:23 hpdl Exp $
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2003 osCommerce
Released under the GNU General Public License
*/
require('includes/application_top.php'
);
require(
DIR_WS_LANGUAGES . $language . '/' . FILENAME_ABOUT_US
);
$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_ABOUT_US
));

 Now it is time to define this new page called about_us.php so in catalog/includes/filenames.php copy one of the defines, paste it underneath or at the bottom of the file, and change the name to your new about_us.php file like this:

define('FILENAME_ABOUT_US', 'about_us.php');

The catalog/includes/languages/english.php file needs to have a listing of this file in whichever box it will be called from in your store. It is defined in the information box for an example.

// information box text in includes/boxes/information.php
define('BOX_HEADING_INFORMATION', 'Information');
define('BOX_INFORMATION_PRIVACY', 'Privacy Notice');
define('BOX_INFORMATION_CONDITIONS', 'Conditions of Use');
define('BOX_INFORMATION_SHIPPING', 'Shipping & Returns');
define('BOX_INFORMATION_CONTACT', 'Contact Us');
define('BOX_INFORMATION_ABOUT_US', 'About Us');

Open the shipping.php page in catalog/includes/languages/english/ folder and other languages folders and save as about_us.php like you did with the catalog/shipping.php page above.

/*
$Id: about_us.php,v 1.4 2002/11/19 01:48:08 dgw_ Exp $
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2002 osCommerce
Released under the GNU General Public License
*/
define('NAVBAR_TITLE', 'About Us'
);
define('HEADING_TITLE', 'About Us'
);
define('TEXT_INFORMATION', 'YOUR ABOUT US TEXT GOES HERE'
);
?>

The define for about_us.php will need to be added to the information.php page in catalog/includes/boxes/information.php or to any new box file you have made.

'<a href="' . tep_href_link(FILENAME_SHIPPING, '', 'NONSSL') . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_PRIVACY, '', 'NONSSL') . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_CONDITIONS, '', 'NONSSL') . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_CONTACT_US, '', 'NONSSL') . '">' . BOX_INFORMATION_CONTACT . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_ABOUT_US, '', 'NONSSL') . '">' . BOX_INFORMATION_ABOUT_US . '</a>'
);

You can change the order of any of these listings in the information.php file but be careful that the last listing has the closing tag ''); and the listings above the last one end with '
' .



Top of Page

 
Level Ten Hosting