Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Blank Main Page when index.php is edited


jfl

Recommended Posts

I would be very grateful for any help from those of you with some experience with this issue.

 

When I edit the index.php file that relates to the front page of the store, it appears blank the next time I log in. When I change the code back to the way it was it still appears blank.

 

Why is this and how do I go about putting text there?

 

Thanks in advance.

Link to comment
Share on other sites

Editing Page Texts

 

The text shown here can be modified in the following file, on each language basis:

 

[path to catalog]/includes/languages/english/index.php

 

That file can be edited manually, or via the Administration Tool with the Languages->English->Define or Tools->File Manager modules.

 

The text is set in the following manner:

 

define('TEXT_MAIN', 'This is a default setup of the osCommerce project...');

 

The text highlighted in green may be modified - it is important to keep the define() of the TEXT_MAIN keyword. To remove the text for TEXT_MAIN completely, the following example is used where only two single quote characters exist:

 

define('TEXT_MAIN', '');

 

One way to look at that index.php file, it's a really, really fancy and intricate frameset page. It's loading a header, a footer, a couple of navigation side bars, and some other stuff I have quite figured out. Big, fancy frameset page. Fiddling with the index.php pages under the assorted languages changes out the middle stuff.

 

My crash course in what NOT to change in PHP taught me this one. Tried playing around with the main index page myself. Wrong idea. Bad idea on my snails pace learning curve. It wasn't til I restored the original layout (probably around the 3rd or 4th time) that I bothered to actually read it.

Link to comment
Share on other sites

Thanks for replying. If I even change one character, as advised by the instructions that are there as default on the main page, it appears blank. When I edit it back to the way it was, it still appears blank. The only way I can figure out to fix this is to uninstall OScommerce from the server and install it again, which is tedious and doesn't solve the problem as it just happens again next time.

 

PLEASE HELP! I really need to get my storefront operational and it is unusable at the moment.

 

 

 

I would be very grateful for any help from those of you with some experience with this issue.

 

When I edit the index.php file that relates to the front page of the store, it appears blank the next time I log in. When I change the code back to the way it was it still appears blank.

 

Why is this and how do I go about putting text there?

 

Thanks in advance.

Link to comment
Share on other sites

This usually happens when the index.php file in the english directory is copied over the index.php file in the root directory. You might want to verify that has not happened.

 

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

Thanks very much for your reply. I did some more digging and searching and found the answer to the problem on this forum at the following link (just in case anyone else has the same problem):

 

http://www.oscommerce.com/forums/index.php?showtopic=154849

 

It turns out that when you edit the file through the file manager it messes up the formatting or something. Works fine when I edit it any other way.

 

Regards,

 

JFL

 

This usually happens when the index.php file in the english directory is copied over the index.php file in the root directory. You might want to verify that has not happened.

 

Jack

Link to comment
Share on other sites

Hello,

 

I am glad you found the solution.

 

Right before I read your last post I was suspecting another reason that could cause the same output, so might as well post it incase anyone else has the problem.

 

When uploading files using ftp you have to make sure (if not set on automatic) that your files ae uploaded in the proper format (ASCII or BINARY). Users who do not have an automatic setting can commonly forget and witness strange problems such as the ones you described.

 

Sincerely,

 

Dave

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...