Jump to content

Archived

This topic is now archived and is closed to further replies.

godfly

TIP: How to add a new page in osCommerce

Recommended Posts

This is probably a simple task for those who are experienced with osCommerce but it took me a while to figure this out. There might be a more elegant way but this works for me.

 

To create a new page (in this scenario, we will create a About Us page out of the Privacy page):

 

1.

BACKUP. It's the #1 rule.

 

2.

Open catalog or root directory\privacy.php and save it with a new name (example: you're creating an about us page, so name this file about_us.php) *REMEMBER: we are not just renaming privacy.php- we are basically cloning it and giving the cloned page a new name.

 

2.a

Change

  $Id: privacy.php 1739 2007-12-20 00:52:16Z hpdl $

to

  $Id: about_us.php 1739 2007-12-20 00:52:16Z hpdl $

*NOTE: I'm not sure what exactly the date / time is for but it looks like it is a timestamp of some sort so maybe you can update it.

 

2.b

Change

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

 $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_PRIVACY));

to

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

 $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_ABOUT_US));

 

3.

Open catalog or root directory\includes\languages\your language\privacy.php and save it with a new name (example: you're creating an about us page, so name this file about_us.php) *REMEMBER: we are not just renaming privacy.php- we are basically cloning it and giving the cloned page a new name.

 

3.a

Change

  $Id: privacy.php 1739 2007-12-20 00:52:16Z hpdl $

to

  $Id: about_us.php 1739 2007-12-20 00:52:16Z hpdl $

*NOTE: I'm not sure what exactly the date / time is for but it looks like it is a timestamp of some sort so maybe you can update it.

 

3.b

Change

define('NAVBAR_TITLE', 'Privacy Notice');
define('HEADING_TITLE', 'Privacy Notice');

define('TEXT_INFORMATION', 'Put here your Privacy Notice information.');

to

define('NAVBAR_TITLE', 'Privacy Notice');
define('HEADING_TITLE', 'Privacy Notice');

define('TEXT_INFORMATION', 'Your new about us text content goes here.');

 

4.

Open catalog or root directory\includes\filenames.php and add the following along with the other defines in the filenames.php code

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

 

And that's it.

Share this post


Link to post
Share on other sites
Open catalog or root directory\includes\filenames.php and add the following along with the other defines in the filenames.php code

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

Should be

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

Note the lowercase " d " in define.


Remember to backup database, files and pictures.

 

I have a problem for your solution

I reject your reality and substitute my own

My mind not only wanders, it sometimes leaves completely

The problem with the gene pool is that there is no lifeguard

Everyone’s entitled to my opinion

 

Links

Security

SSL Help

Basics for design V2.3+

Share this post


Link to post
Share on other sites
Should be

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

Note the lowercase " d " in define.

 

 

Simple to follow and I did every step but for some reason nothing is changed on my site but when you click on Privacy link an 404 error appears

 

eononwholesales.com

Share this post


Link to post
Share on other sites
Simple to follow and I did every step but for some reason nothing is changed on my site but when you click on Privacy link an 404 error appears

 

eononwholesales.com

the link is:

 

http://www.yoursite.com/FILENAME_PRIVACY

You missed step 4


If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Share this post


Link to post
Share on other sites

×