Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Errors on Index Page


Doorman

Recommended Posts

Posted

I am new to oscommerce, and cant seem to figur out how i am goofing up here. The store set up seems to work fin, but i cant edit the index page without getting error messages all over the place. Am i removing code that i am unaware of?

 

http://www.doortech.info/osCommerce/

 

 

some advice would be nice here

 

thanks

Posted

As it says on the front page of your site:

 

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

 

What errors are you getting? If you have a single quote in the text you're trying to add make sure to escape it with a backslash - as in that\'s.

Posted

Download the file you wish to edit and use a text editor such as Ultraedit - if you use the online osCommerce file manager it can strip out backslashes and give you the errors that Ron refers to.

 

Matti

Posted

There is code on the index page, that when i edit the page causes errors. the above quote tells me nothing, as i really dont understand what it is saying. This must be obvious, but lests for fun, say that i am real thick headed.

here is what is her now, as i have no way to "test " as i edit, i am not sure what i can edit....

<?php

/*

$Id: index.php,v 1.1 2003/06/11 17:38:00 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

define('TEXT_MAIN', 'This is a test<br><br><table border="0" width="100%" cellspacing="5" cellpadding="2"><tr><td class="main" valign="top"></td><td class="main" valign="top"><b>test2</b><br><br> <span class="messageStackError">background</span> <br><br>test3</td></tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/2.gif') . '</td><td class="main" valign="top"><b>Editing Page Texts</b><br><br>The text shown here can be modified in the following file, on each language basis:<br><br><nobr class="messageStackSuccess">[path to catalog]/includes/languages/' . $language . '/' . FILENAME_DEFAULT . '</nobr><br><br>That file can be edited manually, or via the Administration Tool with the <nobr class="messageStackSuccess">Languages->' . ucfirst($language) . '->Define</nobr> or <nobr class="messageStackSuccess">Tools->File Manager</nobr> modules.<br><br>The text is set in the following manner:<br><br><nobr>define(\'TEXT_MAIN\', \'<span class="messageStackSuccess">This is a default setup of the osCommerce project...</span>\');</nobr><br><br>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:<br><br><nobr>define(\'TEXT_MAIN\', \'\');</nobr><br><br>More information concerning the PHP define() function can be read <a href="http://www.php.net/define" target="_blank"><u>here</u></a>.</td></tr><tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/3.gif') . '</td><td class="main" valign="top"><b>Securing The Administration Tool</b><br><br>It is important to secure the Administration Tool as there is currently no security implementation available.</td></tr><tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/4.gif') . '</td><td class="main" valign="top"><b>Online Documentation</b><br><br>Online documentation can be read at the <a href="http://wiki.oscommerce.com" target="_blank"><u>osCommerce Wiki Documentation Effort</u></a> site.<br><br>Community support is available at the <a href="http://www.oscommerce.com/forums" target="_blank"><u>osCommerce Community Support Forums</u></a> site.</td></tr></table><br>If you wish to download the solution powering this shop, or if you wish to contribute to the osCommerce project, please visit the <a href="http://www.oscommerce.com" target="_blank"><u>support site of osCommerce</u></a>. This shop is running on osCommerce version <font color="#f0000"><b>' . PROJECT_VERSION . '</b></font>.');

define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s');

define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products');

define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected');

Posted

So i guess what i am saying is that why would you jumble a text area and code all together? Shouldnt there be an area for text and have your code seperate? such as a cgi script?

 

thanks, Bill

Posted
So i guess what i am saying is that why would you jumble a text area and code all together? Shouldnt there be an area for text and have your code seperate? such as a cgi script?

 

thanks, Bill

They are separate. The the text is in the language files.

Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Posted

osCommerce/includes/languages/english/index.php

 

this is the file i am editing, and theis is what shoes up on the oscommerce default page.....

 

when i try to remove the text that is there, it does not work i have an error on line 13 now, and nothing is differnt on that line than before. (well now there is, i keep trying differnt things)

 

 

http://www.doortech.info/osCommerce

 

 

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

 

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

 

this quote above is not the simple truth.

Posted

You're making this a LOT harder than it needs to be for all of this.

 

Start with this. Change the line to:

 

define('TEXT_MAIN', '');

 

Once that works (which it will) add the text you want to disply like so:

 

define('TEXT_MAIN', 'Put the text you want to display here!');

 

What's so hard about that? :blink:

 

If you have this much trouble with what is probably the easiest thing you could possibly do with OSC you might really want to consider hiring someone to build your site for you.

Posted

Okay, so the problem was easy. Let me say that i couldnt understand just to delete all the trash that was there first, because everytime i edited the page i got error messages.

 

thanks for you help

 

Bill

Posted

Dude- word of advice, make your previews smaller in the cart, maybe 1/2 size of what there is now.

The large product images are overwhelming and I think it would look more pleasant smaller.

 

Plus, you need to make people want to click on the category image to take a better look- then they can see the info and such, too.

 

1 step closer to hitting the purchase button...

 

*steps off toadstool*

 

-Jyn

=======,+'^'+,===============================

Jyn Meyer

`+,.,+' Be Glad the world sucks- if it didn't we would all fall off.

===========================================

Archived

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

×
×
  • Create New...