Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

adding a new page?


mooresmusic

Recommended Posts

Hey, I'm pretty new to Oscommerce and just need a quick tip as to how to add a new page to the site. I don't want to add it through a contribution or really mess with adding extra code to my index.php file or any kind of infobox editing,...

 

really all i need is help trying to get a page built and be able to link it from say a picture of normal hyper link on the index page. I need to know what extra tags i need to put in the hyperlink on my index page to have it open up in that section and not a new window. and i also need to know if I can just build a standard html page without PHP and if that will work.

 

I made it out to sound bigger than it is, but it just sounds simple and I should be able to get an answer pretty fast on here :-)

 

really these extra pages will just be used for mainly like something along the lines of a quick news update or something like that, just random pages really.

 

thanks in advance for all your wonderful help.

Link to comment
Share on other sites

You can build just regular html pages, but your session id will be broken if you leave the current php page and then come back to it. I use standard links in my php pages to html pages that are for info only, like colors, articles and such. I bring them up in a new window and customer can read them and close them and their session is still intact with the php pages.

 

Hope this helps.

Tom

Link to comment
Share on other sites

It's actually really easy to do this...

 

Copy an existing page, say, /catalog/conditions.php. Save it with your new file name, say news.php.

 

In your new file, look for:

 

 ?$Id: conditions.php,v 1.22 2003/06/05 23:26:22 hpdl Exp $

 

Change to:

 

 ?$Id: news.php,v 1.22 2003/06/05 23:26:22 hpdl Exp $

 

Look for:

 

 ?require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CONDITIONS);

?$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CONDITIONS));
?>

 

Change to:

 

 ?require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_NEWS);

?$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_NEWS));
?>

 

Now copy an existing language page, say, /catalog/includes/languages/english/conditions.php. Save it with your new file name, say news.php.

 

In your new file, look for:

 

 ?$Id: conditions.php,v 1.4 2002/11/19 01:48:08 dgw_ Exp $

 

Change to:

 

 ?$Id: news.php,v 1.4 2002/11/19 01:48:08 dgw_ Exp $

 

Update the other text in the language file as needed.

 

Now, open /catalog/includes/filenames. Look for:

 

 ?define('FILENAME_CONDITIONS', 'conditions.php');

 

Underneath it, add:

 

 ?define('FILENAME_NEWS', 'news.php');

 

Add a link to your site on whatever page/box you want it in. If adding it to the 'Information' box, for example, go to /catalog/includes/boxes/information.php. Look for:

 

 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? '<a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' .

 

Right underneath that, add:

 

 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? '<a href="' . tep_href_link(FILENAME_NEWS) . '">' . BOX_INFORMATION_NEWS . '</a><br>' .

 

Then open up, /catalog/includes/languages/english.php. Look for:

 

// 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 your new define somewhere in there, like so:

 

// 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_NEWS', 'News');
define('BOX_INFORMATION_SHIPPING', 'Shipping & Returns');
define('BOX_INFORMATION_CONTACT', 'Contact Us');

 

Upload the files to your server and, if I've written this up correctly, you should now have a new link and page on your site. :)

 

HTH,

 

Terry

Terry Kluytmans

 

Contribs Installed: Purchase Without Account (PWA); Big Images, Product Availability, Description in Product Listing, Graphical Infobox, Header Tags Controller, Login Box, Option Type Feature, plus many layout changes & other mods of my own, like:

 

Add order total to checkout_shipment

Add order total to checkout_payment

Add radio buttons at checkout_shipping (for backorder options, etc.)

Duplicate Table Rate Shipping Module

Better Product Review Flow

 

* If at first you don't succeed, find out if there's a prize for the loser. *

Link to comment
Share on other sites

Or use the PageMaker contribution and do it in a few clicks.

 

I was just trying to avoid adding a new contribution right now is all, I'm pressed for time here at my job so i don't have much time to work on this project as I'd like to, so i was just looking for shortcuts.

 

i think for right now i'm gonna go with Socal_kid's ideas,..(actually what i was thinking anyways, just didnt know if it would work in Oscommerce or not)

 

and then down the road when i have time I'll either get the contribution or use TerryK's idea....I just dont have the time to test out the bugs of a contribution and all that fun stuff right now.

 

thanks all!

Link to comment
Share on other sites

Jay,

 

Though the steps seem long, it's actually a breeze to add an additional page using the instructions I provided -- takes a matter of minutes. I've added about 150 extra pages this way with no trouble at all. And there's no problem with losing session IDs...

 

Terry

Terry Kluytmans

 

Contribs Installed: Purchase Without Account (PWA); Big Images, Product Availability, Description in Product Listing, Graphical Infobox, Header Tags Controller, Login Box, Option Type Feature, plus many layout changes & other mods of my own, like:

 

Add order total to checkout_shipment

Add order total to checkout_payment

Add radio buttons at checkout_shipping (for backorder options, etc.)

Duplicate Table Rate Shipping Module

Better Product Review Flow

 

* If at first you don't succeed, find out if there's a prize for the loser. *

Link to comment
Share on other sites

if i did that, where at on the index.php page would i go about putting in the information?

(ie: below)

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

define('BOX_INFORMATION_SHIPPING', 'Shipping & Returns');

define('BOX_INFORMATION_CONTACT', 'Contact Us');

 

would there be somewhere else on the index.php page that i could put it in,...or could i just hyperlink straight to a php page?

Link to comment
Share on other sites

The code above is for adding it to your 'Information' box. If just linking to it from somewhere on the front page, I *think* a regular link within your text would work:

 

<a href="news.php"><b>News</b></a>

 

(Someone else please chime in if I'm wrong...)

 

Terry

Terry Kluytmans

 

Contribs Installed: Purchase Without Account (PWA); Big Images, Product Availability, Description in Product Listing, Graphical Infobox, Header Tags Controller, Login Box, Option Type Feature, plus many layout changes & other mods of my own, like:

 

Add order total to checkout_shipment

Add order total to checkout_payment

Add radio buttons at checkout_shipping (for backorder options, etc.)

Duplicate Table Rate Shipping Module

Better Product Review Flow

 

* If at first you don't succeed, find out if there's a prize for the loser. *

Link to comment
Share on other sites

Now if i did that, would i also still have to add a new page in /catalog/news.php , /catalog/includes/languages/english/news.php , and still change /catalog/includes/filenames and then that would be it right? I'd just have to finish it up by adding the hyperlink to the index.php....sounds correct to me at least? eh?

 

The code above is for adding it to your 'Information' box. If just linking to it from somewhere on the front page, I *think* a regular link within your text would work:

 

<a href="news.php"><b>News</b></a>

 

Terry

Link to comment
Share on other sites

Yes, you would have to do the steps as noted above first.

 

Terry

Terry Kluytmans

 

Contribs Installed: Purchase Without Account (PWA); Big Images, Product Availability, Description in Product Listing, Graphical Infobox, Header Tags Controller, Login Box, Option Type Feature, plus many layout changes & other mods of my own, like:

 

Add order total to checkout_shipment

Add order total to checkout_payment

Add radio buttons at checkout_shipping (for backorder options, etc.)

Duplicate Table Rate Shipping Module

Better Product Review Flow

 

* If at first you don't succeed, find out if there's a prize for the loser. *

Link to comment
Share on other sites

TerryK,

 

I have tried everything to add on extra pages including unlimited pages contrib and no i have tried your suggestion as well. the page is added on but i always get the following errors:

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/ray/public_html/test2/includes/filenames.php:65) in /home/ray/public_html/test2/includes/functions/sessions.php on line 67

 

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/ray/public_html/test2/includes/filenames.php:65) in /home/ray/public_html/test2/includes/functions/sessions.php on line 67

 

any idea how to get it running correctly or atleast what may be causing the problem?

 

thanks,

ray

Link to comment
Share on other sites

I was just trying to avoid adding a new contribution right now is all, I'm pressed for time here at my job so i don't have much time to work on this project as I'd like to, so i was just looking for shortcuts.

 

i think for right now i'm gonna go with Socal_kid's ideas,..(actually what i was thinking anyways, just didnt know if it would work in Oscommerce or not)

 

and then down the road when i have time I'll either get the contribution or use TerryK's idea....I just dont have the time to test out the bugs of a contribution and all that fun stuff right now.

 

thanks all!

It's called a contribution since it was contributed to oscommerce but it is not something you install into your shop. It is a stand-alone program. You unzip it, point it to where your files are and create the page. It prevents all of the problems you are now experiencing but I realize it is not for everyone.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...