Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Adding New Pages


blakey989

Recommended Posts

hello all,

 

i'm going to show you the files you need to edit in order to add a new page to your oscommerce store, for this e.g. we are going to create an ABOUT US page, i required this page for my store to expand on the information i'd supplied in my index.php.

 

BACKUP BACKUP BACKUP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

 

Files To Edit:

/catalog/inlcudes/languages/english/privacy.php

/catalog/privacy.php

/catalog/includes/languages/english.php

/catalog/includes/filenames.php

/catalog/includes/boxes/information.php

 

Step 1:

find a page that already exists that suits the needs of the new page you want to create (simpler than creating your own), for this example we are going to use the privacy information page (as we only require text on the about us page).

 

so copy your privacy information page to your computer using ftp or your hosting control pannel

(location:/catalog/includes/languages/english/privacy.php(and other languages as required)

 

open with either notepad or simular php editor (once edited keep this file on your computer as once everything is working you will need to input your about us text in this file.)

 

CHANGE

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

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

 

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

 

TO

define('NAVBAR_TITLE', 'About Us');

define('HEADING_TITLE', 'About Us');

 

define('TEXT_INFORMATION', 'Put here your Company/Store information.');

 

Save and Rename file to about_us.php

 

Step 2:

copy to your computer

/catalog/privacy.php

 

Find:

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

 

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

 

Change To:

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

 

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

 

Save changes and rename to about_us.php note:you may need to rename to about_us_catalog.php for now because you should already have a file called about_us.php you created before, either rename to simular as above or so you know which one is which, or seperate them by creating a temp new folder for this file.

 

Step 3:

We are going to add the about us page to the 'information box' containing your privacy, terms and condition pages as this is where i feel the about us page belongs, but you could effectivly add it to your top navigation if you wanted.

 

copy to your computer

/catalog/includes/languages/english.php

 

Find:

 

// 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');

 

Add Bellow:

define('BOX_INFORMATION_ABOUT', 'About Us');

 

Save Changes

 

Step 4:

copy file

/catalog/includes/boxes/information.php

 

Find:

'<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' .

 

Add (add where in the list you would like it to show, so in this example we will put directly between the above.

'<a href="' . tep_href_link(FILENAME_ABOUT) . '">' . BOX_INFORMATION_ABOUT . '</a><br>' .

 

Save Changes

 

Step 5:

copy to computer

/catalog/includes/filenames.php

 

Find:

// define the filenames used in the project

define('FILENAME_ACCOUNT', 'account.php');

define('FILENAME_ACCOUNT_EDIT', 'account_edit.php');

 

as this file is sorted in aphabetical order

 

Add:

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

 

Above:

define('FILENAME_ACCOUNT', 'account.php');

 

Save Changes

 

copy to server and overwrite existing files:

/catalog/includes/languages/english.php

/catalog/includes/filenames.php

/catalog/includes/boxes/information.php

 

copy to the server your new files: (you should not overwrite any files if you've renamed the following correctly you still want your privacy pages!!)

/catalog/inlcudes/languages/english/about_us.php (file created in step 1)

/catalog/about_us.php (file created in step 2, if you renamed please change back to about_us.php once you've copied about_us from step 1 back to the server)

 

you should now have a new link in the information box that displays as 'About Us' and a new page that has the Text

 

You are here: Top » Catalog » About Us

About Us

Put here your Company/Store information.

 

Now if everything is working correctly you can return to step 1 and edit

 

define('TEXT_INFORMATION', 'Put here your Company/Store information.');

 

only edit the 'Put here your Company/Store information.' keeping inside the ' '. you can enter both text and html to suit your needs

 

IF SOMETHING WENT WRONG THEN IT'S FINE BECAUSE YOU BACKED UP RIGHT???? REMEMBER TO ALWAYS BACK UP BEFORE MAKING CHANGES

 

hope this helps, if you have problems please post here and i will try to help

 

Dan

Link to comment
Share on other sites

  • 4 weeks later...

Superb directions. I did as instructed but had a problem. I could't find it so I started undoing until my cart was again working. That's when I found that I had not done it exactly as indicated. Redid it and it works wonderfully. Now if I could only find instructions like yours for updating the shipping module and the security issues. Thank you. I will look for your contributions from now on.

Link to comment
Share on other sites

  • 2 weeks later...

Superb directions. I did as instructed but had a problem. I could't find it so I started undoing until my cart was again working. That's when I found that I had not done it exactly as indicated. Redid it and it works wonderfully. Now if I could only find instructions like yours for updating the shipping module and the security issues. Thank you. I will look for your contributions from now on.

 

Thank you for your kind words!

 

for your security issues i would look at this post,Security Instructions it is the information i used to aid me in securing my site i would advise that you follow them as closely as possible.

 

what issue do you have with your shipping module? i may be able to point you to a solution

 

good luck

 

Dan

Link to comment
Share on other sites

  • 1 month later...

I've done all the steps correctly, but there isn't anything new on my website. :(

 

Also, in the "/catalog/includes/boxes/information.php" file, your were supposed to add:

 

'<a href="' . tep_href_link(FILENAME_ABOUT) . '">' . BOX_INFORMATION_ABOUT . '</a><br>' .

 

Between:

 

'<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' .

 

But, my I couldn't find those lines, instead I found these:

 

<li class="bg_list3_un"><a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a></li>' .

'<li class="bg_list3"><a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a></li>' .

'<li class="bg_list3"><a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a></li>' .

 

And so I added: '<li class="bg_list3"><a href="' . tep_href_link(FILENAME_ABOUT) . '">' . BOX_INFORMATION_ABOUT . '</a></li>' . between Privacy & Conditions.

 

Maybe that's why it dooesn't work?

 

My osCommerce version is: 2.2RC2

Link: http://www.sunect.nl

Link to comment
Share on other sites

I don't know what you expect to see on your template, but there is no information box present, so it's indifferent what links you add to this box, the others do also not appear

 

You have to add the link either to your footer (includes/footer.php) or to the top navbar that I guess must be in your includes/header.php. Alternativelly you could add the information bax back to the left column, must be commented out in file includes/column_left.php

 

Did you ask for any support from the template maker? [lol :)]

Link to comment
Share on other sites

I've done all the steps correctly, but there isn't anything new on my website. :(

 

Also, in the "/catalog/includes/boxes/information.php" file, your were supposed to add:

 

'<a href="' . tep_href_link(FILENAME_ABOUT) . '">' . BOX_INFORMATION_ABOUT . '</a><br>' .

 

Between:

 

'<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' .

 

But, my I couldn't find those lines, instead I found these:

 

<li class="bg_list3_un"><a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a></li>' .

'<li class="bg_list3"><a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a></li>' .

'<li class="bg_list3"><a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a></li>' .

 

And so I added: '<li class="bg_list3"><a href="' . tep_href_link(FILENAME_ABOUT) . '">' . BOX_INFORMATION_ABOUT . '</a></li>' . between Privacy & Conditions.

 

Maybe that's why it dooesn't work?

 

My osCommerce version is: 2.2RC2

Link: http://www.sunect.nl

 

as far as i can see 'multimixer' is right in that your template has many changes from the oscommerce stock that this reffers to, i use STS 4.6 myself and had to change the relevant files for this to take affect in my template. i would suggest from looking at your site that you do as says above and then look in the footer.php possibly in you language folder (will depend on where the template creater applied the changes to the footer file) and look for where the privacy and conditions links are called, as you have the link for shipping but it's not shown. and create a simular code for about us page.

Link to comment
Share on other sites

  • 8 months later...

Hi there,

 

I've carried out steps 1 and 2 no problem.

 

step 3 and 4 seem to be the problem

 

step 3 copy to your computer

/catalog/includes/languages/english.php

 

Find:

 

// 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');

 

Add Bellow:

define('BOX_INFORMATION_ABOUT', 'About Us');

 

 

 

Nowhere on my /catalog/includes/languages/english.php do i see any of these lines, any idea where i can find them?

 

 

 

 

i'm using os 2.3.1 link: http://www.blackseanursery.com/index.php

Link to comment
Share on other sites

  • 6 months later...

Hi there,

 

I've carried out steps 1 and 2 no problem.

 

step 3 and 4 seem to be the problem

 

step 3 copy to your computer

/catalog/includes/languages/english.php

 

Find:

 

// 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');

 

Add Bellow:

define('BOX_INFORMATION_ABOUT', 'About Us');

 

 

 

Nowhere on my /catalog/includes/languages/english.php do i see any of these lines, any idea where i can find them?

 

 

 

 

i'm using os 2.3.1 link: http://www.blackseanursery.com/index.php

 

 

same problem here, can you explain how you solved problem?

Link to comment
Share on other sites

step 3 copy to your computer

/catalog/includes/languages/english.php

/catalog/includes/languages/english/modules/boxes/bm_information.php This is the correct file

 

Find:

 

// 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');

 

Add Bellow:

define('BOX_INFORMATION_ABOUT', 'About Us');

Link to comment
Share on other sites

Link to comment
Share on other sites

Hi Vampire,

 

As regards the html editor

 

http://www.oscommerce.com/community/contributions,7650

 

for older version

 

http://www.oscommerce.com/community/contributions,7112

 

 

 

The extra pages add ons are a choice!

 

I actually use 2 contributions one which I let appear as link on home page left/right hand column and the other I use to generate pages which do not necessarily have to appear as a permanent link in info box or whatever they are just there and I can link when I want sometimes also use a bit of html but 99% it is not needed

 

John

To improve is to change; to be perfect is to change often.

 

Link to comment
Share on other sites

  • 1 month later...

Hi all,

 

I have made a bunch of extra pages like described in post 1 of this topic and that works just fine but now i need to make extra pages that folow these extra pages.

My problem is this : i use one of these extra pages to show demonstration videos on and if you put more than 8 or 10 videos on a page it will start to load slow and it is also not very handy for a client to have to scroll thru 60 or more videos before he finds what he needs.

 

So my question is : how can i make extra pages on wich i can put a previous/next button on so i have 10 vids on a page and a lot of pages after each other?

 

Thanks in advance!

 

Rob

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...