Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

cannot get rid of "MAIN_TEXT"


Guest

Recommended Posts

TEXT_MAIN is defined in your catalog/includes/languages/<somelanguage>/index.php.

 

It is called from your catalog/index.php file.

 

So, if it's showing up on your main page then either it's being called incorrectly or you have removed the definition of TEXT_MAIN in your languages' index.php file.

Link to comment
Share on other sites

Hello,

 

Please check the "Edit Main Content" flash tutorial at:

 

http://oscommerce-template-easy.com/oscomm...lumn-series.htm

 

Hope it helps.

 

 

Hey!! That's a great page! How did I go so long without knowing that existed?? :o

Just between us, remember there are only 10 kinds of people in the world; those who understand binary and those who don't!!

 

Remember, learning is a "do-it-yourself" experience; although, not necessarily a "do-it-BY-yourself" experience.

 

The quickest way to learn is to forget to BACKUP!

Link to comment
Share on other sites

TEXT_MAIN is defined in your catalog/includes/languages/<somelanguage>/index.php.

 

It is called from your catalog/index.php file.

http://www.oscommerce.com/forums/style_images/...s/textcolor.gif

So, if it's showing up on your main page then either it's being called incorrectly or you have removed the definition of TEXT_MAIN in your languages' index.php file.

 

 

taking bennstein's answer (which is right on) a bit further, the conclusion is that the constant TEXT_MAIN has not been defined (which is why it's showing up as TEXT_MAIN, rather than what it's supposed to be)

 

troubleshooting guaranteed to correct you problem:

1. check catalog/index.php and make sure near the top you see the following line, which tell the server to read the file that has all of the constants defined:

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

 

1.b (unlikely, but included for completeness) check catalog/includes/filenames.php and make sure it contains the following bit of code:

  define('FILENAME_DEFAULT', 'index.php');

 

2. open catalog/includes/languages/english/index.php (note that this is NOT the same file as the one referenced in #1, despite having the same name, a possible point of confusion) make sure that it includes the following line:

define('TEXT_MAIN', '');

if you just want the TEXT_MAIN to disappear, use exactly that code. if you want to replace it with some text, enter your text between the two empty single quotes:

define('TEXT_MAIN', 'Your text goes here.');

 

3. make sure it's being called correctly: open catalog/index.php and somewhere you should find:

echo TEXT_MAIN;

If you just want to get rid of it, you could delete that line. if you want to use the text that is assigned to that constant (which you did in step 2), just make sure that line is as written, and does NOT have single quotes around TEXT_MAIN (which would make the echo command output the literal charactars TEXT_MAIN rather than evaluate the constant and output whatever text is defined in the constant).

 

 

double check that all of the above bits of code end with a semi-colon (a common problem)

 

cheers,

rj

Link to comment
Share on other sites

I wonder if you guys can help me out: i just checked the tutorial on the above link (great link btw) and saw how to change the Greeting Header.

 

What i want to do, however, is to change the greeting header (heading_title) according to what is selected from the categories box. i don't php but i can read my way through the code. below is what i'm trying to do:

if ($category == 'product1') {

define('HEADING_TITLE', 'product1');

}

 

i'm not sure what the category field name is (if tried $category_depth, $category_name etc). the db categories table doesn't have (like i expected) a category_name or something similar.

 

any help is greatly appreciated

 

thanks

jose

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...