Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Where / How Edit Welcome Text


uswebpro

Recommended Posts

Posted

How/ Where do you edit the:

 

 

What's New Here? 

 

Welcome Guest! Would you like to log yourself in? Or would you prefer to create an account?

 

This is a demonstration online-shop, any products purchased will not be delivered nor billed. Any information seen on these products are to be treated fictional.

 

If you wish to download this sample shop, or to contribute to this project, please visit the support site. This shop is based on osCommerce 2.2-CVS.

Posted
What's New Here?

and

This is a demonstration online-shop, any products purchased will not be delivered nor billed. Any information seen on these products are to be treated fictional.

 

is in catalog/includes/languages/english/index.php

What's will look like What\'s though :)

 

 

Welcome Guest! Would you like to log yourself in? Or would you prefer to create an account?

 

is in catalog/includes/languages/english.php

Keith

 

 

What the hell was I thinkin'?

Posted

Im not trying to be rude, but....... Why don't you read the main page itself, the one that you want to edit, it tells you right there what to do. Please read read read before asking others, it just looks like laziness when people ask for help first before even trying to do it themselves. I need help myself plenty of times and I do ask, but I have spent many hours reading and with trial and errror. I don't mind helping anyone who needs help, if I can help in anyway, BUT....... I will not help anyone who will not even try to help themselves!

 

Please do not take this personal and it is not totaly directed towards you. I guess you can call this a request to all the people who bog down help forums with posts like "PLEASE HELP ME I BECAUSE I'M TO LAZY TO TRY IT MYSELF FIRST" This is really anoying becuse it means we have to sift through all the garbage before getting to anything meaningful. Take a minute and try it yourself first people!

 

I bet there are hundreds if not thousands of people who feel the same way!

 

Thanks,

Steel

 

P.S. For the record, the location of:

Welcome Guest! Would you like to log yourself in? Or would you prefer to create an account?

was a vaild question, it does not tell you were this is on the main page.

Posted

A good place to look before asking questions is Collaborative Documentation Effort click the link in the top right corner of the page your looking at now. Also try doing a search of the forums.

 

Steel

  • 2 months later...
Posted

I must add my own "duh" to this thread. I just started up the system and I too am having some difficulties with it.

 

YES, i've read posts. YES, I've tried fixing it. YES, I've looked through the Knowledge base.

 

If you do not want to answer a person, just don't answer. No need to flame the poor fellow.

 

I have tried repeatedly with this (to you an "obvious") problem, but with no avail. I am uncertain where to START editing and where to STOP editing. Many of my attempts have resulted in error messages, and PHP is not the most user-friendly coding language ever devised, especially for a newb.

 

I am a web designer, graphic designer, IT support person, and this STILL gives me fits. If you are willing to answer, even if it may still seem "lazy" as has been suggested, then please do so. Otherwise, I'll just keep trying on my own, as will the user who began this thread - left scratching my head wondering why there is a support forum at all.

 

Thanks.

Posted

OK, here's where I am at:

 

I've deleted the text that begins 'This is the default...' As the instructions state there, I'm not touching anything outside those quote marks.

 

I took it all the way to the last quote mark before . Product Version .

 

That is, all the way down to: This shop is running on osCommerce version <font color="#f0000"><b>' I made sure to KEEP that last quote mark, of course.

 

I deleted all that and put in the word TEXT as a placeholder.

 

No prob - it displayed just fine. But when I added more text I got this error:

 

Parse error: parse error, unexpected T_STRING in /hsphere/local/home/lifecent/lifecenter.org/catalog/includes/languages/english/index.php on line 13

 

Even though I didn't change ANY of the syntax. I'll keep working and posting on this for your benefit, but if any locals want to bail me out, go ahead and jump in.

 

Thanks

Posted

OK, here's what I'v got that works. Go ahead and copy and paste this in, changing your text where needed.

 

define('TEXT_MAIN', '<p>Welcome to Life Center\'s E-Store.</p><p>We are adding new items, including books from The Armory. Please be patient while we make this switch, and don\'t hesistate to call us if you run into any problems. Phone: 770-399-0660, ext. 113.</p>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');

 

OK. That should be obvious where to post this at, but what may NOT be obvioius is that PHP needs those little ' marks as coding. So, if you use them, you've got to add a little backslash before it. Notice the words "DON'T" and in the word "LIFE CENTER'S" have a backslash that tells PHP to ignore that quote mark as code and to just display it.

 

OK STEEL FLAME AWAY BABY - BUT I FIXED IT MY OWN DANGED SELF WITH NO KNOWLEDGE OF PHP AND POSTED MY ANSWER FOR A GUY WHO REALLY NEEDS IT!!!!!

Posted

BRANDON! THANK YOU!! THANK YOU!!

 

I have spent hours, days, and weeks on this. I have:

 

uninstalled and reinstalled. Twice.

 

I have copied, saved and printed the entire original code before touching anything so I could at least go back to square 1 if needed.

 

I have been to PHP.net to try to educate myself. :rolleyes:

 

I have read and reread the original instructions on how to edit the text.

 

I have been to very scary places deep within the files of my website where no newbie should ever be... :unsure:

 

and the reward of all my efforts were various ugly black parse errors that would not go away...

 

I wouldn't call that lazy.

 

then

 

I cut and pasted and modified your solution and now I am in business all within 10 minutes.

 

God Bless you for your willingness to help.

 

:)

 

If there was a kissing smiley - I'd give it to you.

 

Scarlett

Posted

Brandon,

 

I copied EXACTLY what you wrote for the code pasted it into my index.php file overtop of the old text and I still get a

 

Parse error: parse error in /home/dvdsnsut/public_html/ecommerce/os/catalog/includes/languages/english/index.php on line 19

 

as well as Text_Main, Heading_Title, TABLE_HEADING_UPCOMING_PRODUCTS, and TABLE_HEADING_DATE_EXPECTED all left just as they appear here on the page. Look here

 

I dont know why this does this. Please help. Thanks.

 

Doug

Posted

Hmmm...I'm utterly new to this system, for your info, but isn't line 19 where it gets into the upcoming products part? The featured products at the bottom of the screen?

 

if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) {

 

That's what MY line 19 is anyhow.

 

The text I sent is just to take out the WELCOME AND THIS IS THE DEFAULT TEXT YOU'RE READING stuff.

 

Your site looks OK, it just has no default text, welcoming your guests. And you've got a broken image link.

 

You've just got to add in your own text, just as I did, up above the version notice (the text in red)

 

If you're just hitting an error page (you're not, it seems), you could always reset the system. I've done that and I just have to fix a couple things, like the index.php file and deleting the install file from the server.

 

Should be home free from there.

Posted

I have since fixed the parse error problem, but now please look at my post in Editing the main index.php. This is where I am lost. Thanks.

 

Doug

  • 1 month later...
Posted

No flames just answers heres what you do:

You will need to delete everything in between the single red quote signs, it looks like this ' BUT they will not be red in your page I just made them red here so you can see them better.

 

<?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 default setup of the osCommerce project, products shown are for demonstrational purposes, <b>any products purchased will not be delivered nor will the customer be billed</b>. Any information seen on these products is to be treated as fictional.<br><br>

<table border="0" width="100%" cellspacing="5" cellpadding="2"><tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/1.gif') . '</td><td class="main" valign="top"><b>Error Messages</b><br><br>If there are any error or warning messages shown above, please correct

them first before proceeding.<br><br>Error messages are displayed at the very top of the page with a complete <span class="messageStackError">background</span> color.<br><br>Several checks are performed to ensure a healthy setup of your online store - these checks can be disabled by

editing the appropriate parameters at the bottom of the includes/application_top.php file.</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');

 

if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) {

  define('HEADING_TITLE', 'Let\'s See What We Have Here');

  define('TABLE_HEADING_IMAGE', '');

  define('TABLE_HEADING_MODEL', 'Model');

  define('TABLE_HEADING_PRODUCTS', 'Product Name');

  define('TABLE_HEADING_MANUFACTURER', 'Manufacturer');

  define('TABLE_HEADING_QUANTITY', 'Quantity');

  define('TABLE_HEADING_PRICE', 'Price');

  define('TABLE_HEADING_WEIGHT', 'Weight');

  define('TABLE_HEADING_BUY_NOW', 'Buy Now');

  define('TEXT_NO_PRODUCTS', 'There are no products to list in this category.');

  define('TEXT_NO_PRODUCTS2', 'There is no product available from this manufacturer.');

  define('TEXT_NUMBER_OF_PRODUCTS', 'Number of Products: ');

  define('TEXT_SHOW', '<b>Show:</b>');

  define('TEXT_BUY', 'Buy 1 \'');

  define('TEXT_NOW', '\' now');

  define('TEXT_ALL_CATEGORIES', 'All Categories');

  define('TEXT_ALL_MANUFACTURERS', 'All Manufacturers');

} elseif ($category_depth == 'top') {

  define('HEADING_TITLE', 'What\'s New Here?');

} elseif ($category_depth == 'nested') {

  define('HEADING_TITLE', 'Categories');

}

?>

 

The result will look like this:

 

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

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

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

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

 

if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) {

  define('HEADING_TITLE', 'Let\'s See What We Have Here');

  define('TABLE_HEADING_IMAGE', '');

  define('TABLE_HEADING_MODEL', 'Model');

  define('TABLE_HEADING_PRODUCTS', 'Product Name');

  define('TABLE_HEADING_MANUFACTURER', 'Manufacturer');

  define('TABLE_HEADING_QUANTITY', 'Quantity');

  define('TABLE_HEADING_PRICE', 'Price');

  define('TABLE_HEADING_WEIGHT', 'Weight');

  define('TABLE_HEADING_BUY_NOW', 'Buy Now');

  define('TEXT_NO_PRODUCTS', 'There are no products to list in this category.');

  define('TEXT_NO_PRODUCTS2', 'There is no product available from this manufacturer.');

  define('TEXT_NUMBER_OF_PRODUCTS', 'Number of Products: ');

  define('TEXT_SHOW', '<b>Show:</b>');

  define('TEXT_BUY', 'Buy 1 \'');

  define('TEXT_NOW', '\' now');

  define('TEXT_ALL_CATEGORIES', 'All Categories');

  define('TEXT_ALL_MANUFACTURERS', 'All Manufacturers');

} elseif ($category_depth == 'top') {

  define('HEADING_TITLE', 'What\'s New Here?');

} elseif ($category_depth == 'nested') {

  define('HEADING_TITLE', 'Categories');

}

?>

 

Now it may look like a double quote (") but its not, it is two single quotes side by side (''). This may confuse alot of people, I know it got me at first and Im sure thats what is getting most people. If you look very close you can see a difference '' " anyway... put your text in between the two sinlge quote signs. The result will look like this

 

<?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', 'hello here is the result');

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

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

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

 

if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) {

define('HEADING_TITLE', 'Let\'s See What We Have Here');

define('TABLE_HEADING_IMAGE', '');

define('TABLE_HEADING_MODEL', 'Model');

define('TABLE_HEADING_PRODUCTS', 'Product Name');

define('TABLE_HEADING_MANUFACTURER', 'Manufacturer');

define('TABLE_HEADING_QUANTITY', 'Quantity');

define('TABLE_HEADING_PRICE', 'Price');

define('TABLE_HEADING_WEIGHT', 'Weight');

define('TABLE_HEADING_BUY_NOW', 'Buy Now');

define('TEXT_NO_PRODUCTS', 'There are no products to list in this category.');

define('TEXT_NO_PRODUCTS2', 'There is no product available from this manufacturer.');

define('TEXT_NUMBER_OF_PRODUCTS', 'Number of Products: ');

define('TEXT_SHOW', '<b>Show:</b>');

define('TEXT_BUY', 'Buy 1 \'');

define('TEXT_NOW', '\' now');

define('TEXT_ALL_CATEGORIES', 'All Categories');

define('TEXT_ALL_MANUFACTURERS', 'All Manufacturers');

} elseif ($category_depth == 'top') {

define('HEADING_TITLE', 'What\'s New Here?');

} elseif ($category_depth == 'nested') {

define('HEADING_TITLE', 'Categories');

}

?>

 

you can even add html inside of the php too, if you like just remember all html rules still apply. You will just have to play around with it to check it out.

 

Good luck and I hope this helps

 

Steel

 

PS cant we all have just one bad day... I hope this made up for it ;)

Posted

I don't want any text at my welcome screen.. I delet everything but it still displays USER_GREETING_TEXT and 'TEXT_MAIN' ... what should I do

?,???`???,?? God must love stupid people, he made so many ??,???`???,?

Archived

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

×
×
  • Create New...