Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Adding pages - copying to /includes/english not working?


Guest

Recommended Posts

Posted

Here's a play by play as to what EXACTLY I did last night -

 

I have added the following pages - ABOUT | CONTACT | FRAUD PREVENTION

 

I initially created the about.php by copying the PRIVACY.PHP and renaming it "aboutus.php".

 

Searching the code in this new aboutus.php page, I found first <TD> tag below the first <table> tag and inserted, as a test," askdfj akjbf aksbf".

 

This "test" text showed up when I reposted it and so I proceeded to replace it with "about us" text.

 

I repeated this process and created the pages above (contact, fruad etc.etc.)

 

Each time I saved these new pages into my catalog folder or "top level" in my instance since, no subdomian in use.

 

I DID NOT save them to any /includes/english. I added links to these on the bottom of my index page.

 

Everything appeared to work fine (navigation wise), I was able to click on the links and it would render these pages just fine.

 

THEN I edited the specials.php page. NOT altering any pre-existing code - just insterting text after the first <td> tag - (did usual check to make sure it was the correct tag within body of page)

 

I then uploaded this to the catalogue and it worked fine.

 

I then travelled to this forum to check a previous post and read (for the 3rd time) the following (summarized):

 

"When you create a new page/edit the code of an existing page, you should save it to the catalog folder AND the english folder AND any other language folders you have"

 

Soooooo, this being the third time I've read it I thought I should perhaps take this advice.

 

I proceded to copy the new and "currently working" page of specials.php to my inlcudes/english folder (I only have two languages - english and spanish)

 

I went to reload the page and !BLAM! - FATAL ERROR - went over to my new aboutus.php and !BLAM! FATAL ERROR.

 

I will now have to "back out" all these changes and begin again....remember...all of the above page additions were working fine (appearance and navigation wise) BEFORE I copied anything to the includes/english folder.

 

When I say Root I meant the "top leve" where OSC rests...It happens to be the only thing installed in this hosting account and hence is in what i would call the "top level" or root level. potato - potatoe

 

The error reads:

 

Fatal error: Cannot redeclare tep_db_connect() (previously declared in /home/content/t/h/e/theijacket/html/includes/functions/database.php:13) in /home/content/t/h/e/theijacket/html/includes/functions/database.php on line 13

 

Anyone know why this is failing?

 

TIA

 

Marctrimble

Posted

osCommerce works like this.

 

In the root level you have the file with the php code and the html table structure. This code calls in the header, footer, left and right columns, and has a <?php echo TEXT_MAIN; ?> command, and it's this command that pulls in the content in the middle of the page from another file of the same name (but with different content) in the includes/language/english/ folder.

 

At the includes/languages/english/ level the file includes the content that appears in the middle of the page, and it's included here:

define('TEXT_MAIN', 'put some text here');

 

The reason you are getting an error is because you copied the root level file to the includes/languages/english/ folder (by the sound of things).

 

Vger

Posted
osCommerce works like this.

 

In the root level you have the file with the php code and the html table structure. This code calls in the header, footer, left and right columns, and has a <?php echo TEXT_MAIN; ?> command, and it's this command that pulls in the content in the middle of the page from another file of the same name (but with different content) in the includes/language/english/ folder.

 

At the includes/languages/english/ level the file includes the content that appears in the middle of the page, and it's included here:

define('TEXT_MAIN', 'put some text here');

 

The reason you are getting an error is because you copied the root level file to the includes/languages/english/ folder (by the sound of things).

 

Vger

 

You are absolutely correct, that's exactly what I did and cna now "see" why that error occurred. Thanks a ton! That really helps frame the context in which one works when editing these files....

Posted
osCommerce works like this.

 

In the root level you have the file with the php code and the html table structure. This code calls in the header, footer, left and right columns, and has a <?php echo TEXT_MAIN; ?> command, and it's this command that pulls in the content in the middle of the page from another file of the same name (but with different content) in the includes/language/english/ folder.

 

At the includes/languages/english/ level the file includes the content that appears in the middle of the page, and it's included here:

define('TEXT_MAIN', 'put some text here');

 

The reason you are getting an error is because you copied the root level file to the includes/languages/english/ folder (by the sound of things).

 

Vger

 

In order to create an About_Us.php page out of the existing Privacy.php I would do the following:

 

Open the existing privacy.php from the catalog in DW. Save as about_us.php

Open exisitng privacy.php from includes/lang/eng and save as about_us.php in same folder.

 

Now I have an exact duplicate of the privacy.php occurence.

 

If I edit the following in incl/lang/eng, it will change the body text on the on the "upper level" about_up.php. In effect, I've edited the "call"...no?

 

<?php

/*

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

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2002 osCommerce

 

Released under the GNU General Public License

*/

 

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

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

 

define('TEXT_INFORMATION', 'I changed the page to about us');

?>

Archived

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

×
×
  • Create New...