Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Easiest way to edit index page text


jdubbya

Recommended Posts

Posted

Im trying to edit out the text on the main index page, all the "this is a test, no products will be shipped" stuff. Im editing the index.php file in the admin panel, and it works fine if I add just a few words in place of the first paragraph, but If I type in the whole paragraph that I want it to display on my main page, I get some line 13 error, or something like that and have to restore the index.php file.

 

Is there an easier way to edit text without having to play with html code?

Posted

No

 

If you posted the "line 13 error, or something like that" you might get some more help.

 

(Anyway search for escape characters in this forum, I suspect you are trying to use " or ' in your new text.)

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Posted
define('TEXT_MAIN', 'Editing <b>TEXT_MAIN</B> really isn\'t that hard.<br>
Just be sure to put a \ (slash) in front of all the \' (single tick marks).<br>
If you don\'t to that, PHP can\'t figure out what it\'s doing so it won\'t display the page.<br>
<br>
If you continue to have problems, post the text.<br>
I\'m sure someone will help.<br>
<br>
I hope this demo hasn\'t been been in vain');

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted

Leaving out the <br> won't cause an error.

 

Like I said, if you post what it is you're trying to insert, someone will be able to see the problem.

 

And a complete error message would be nice as well.

;)

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted
Leaving out the <br> won't cause an error.

 

Like I said, if you post what it is you're trying to insert, someone will be able to see the problem.

 

And a complete error message would be nice as well.

;)

 

Parse error: syntax error, unexpected T_STRING in /home/.pinnacle/jdubbya/samuraiscoot.com/catalog/includes/languages/english/index.php on line 14

 

It seems like I can edit one line just fine, or maybe 2, but when I type out the paragraph I want, I get that error.

 

 

Also Is there an easy way to get rid of this:

 

 

 

"Error Messages

 

If there are any error or warning messages shown above, please correct them first before proceeding.

 

Error messages are displayed at the very top of the page with a complete background color.

 

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.

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:"

Posted
Like I said, if you post what it is you're trying to insert, someone will be able to see the problem.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2007 osCommerce

 

Released under the GNU General Public License

*/

 

define('TEXT_MAIN', 'Welcome to Samuraiscoot.com

Your new source for performance scooter parts that you can't get anywhere else!

We get the latest and best products straight from our place in Taiwan, things you can't get in the states. We specialize in parts for the new Zuma 125, custom exhausts, shocks lights, body panels, click the scooter to the left to see what's available. Don't see what you are looking for? Shoot me an email on the requests page, I will do my best to see if it is something I can order.<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">' .

 

Im just trying to edit the first paragraph for now until I figure out how to delete the rest of the default junk.

Posted

define('TEXT_MAIN', 'Welcome to Samuraiscoot.com
Your new source for performance scooter parts that you can\'t get anywhere else! 
We get the latest and best products straight from our place in Taiwan, things you can\'t get in the states. We specialize in parts for the new Zuma 125, custom exhausts, shocks lights, body panels, click the scooter to the left to see what\'s available. Don\'t see what you are looking for? Shoot me an email on the requests page, I will do my best to see if it is something I can order.<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">' .

Didn't you read the bit about \'?

:unsure:

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted

Things like

can't

need to be like

can\'t

 

 

So, as you can see, the apostrophe is escaped.

Posted
Things like

can't

need to be like

can\'t

 

 

So, as you can see, the apostrophe is escaped.

 

Son of a >>>>

 

Lol

Owned by puctuation.

Posted

Ok, one last thing, can somebody help me edit out all that default jargon about errors and all that jazz? Here is how my index looks now.

 

<?php

/*

$Id: index.php 1739 2007-12-20 00:52:16Z hpdl $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2007 osCommerce

 

Released under the GNU General Public License

*/

 

define('TEXT_MAIN', '<b>WELCOME TO SAMURAISCOOT.COM</b><br>

Your new source for performance scooter parts that you cant get anywhere else! We get the latest and best products straight from our place in Taiwan, things you cant get in the states.

 

We specialize in parts for the new Zuma 125, custom exhausts, shocks lights, body panels, click the scooter to the left to see whats available.

 

Dont see what you are looking for? Shoot me an email on the requests page, I will do my best to see if it is something I can order.<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>Online Documentation</b><br><br>Online documentation can be read at the <a href="http://www.oscommerce.info" target="_blank"><u>osCommerce Knowledge Base</u></a> site.<br><br>Support is available at the <a href="http://www.oscommerce.com/support" target="_blank"><u>osCommerce Support Site</u></a>.</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 <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');

}

?>

Posted
define('TEXT_MAIN', '<b>WELCOME TO SAMURAISCOOT.COM</b><br>
Your new source for performance scooter parts that you can\'t get anywhere else! We get the latest and best products straight from our place in Taiwan, things you can\'t get in the states.<br>
<br>
We specialize in parts for the new Zuma 125, custom exhausts, shocks lights, body panels, click the scooter to the left to see what\'s available.<br>
<br>
Don\'t see what you are looking for? Shoot me an email on the requests page, I will do my best to see if it is something I can order.');

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted
define('TEXT_MAIN', '<b>WELCOME TO SAMURAISCOOT.COM</b><br>
Your new source for performance scooter parts that you can\'t get anywhere else! We get the latest and best products straight from our place in Taiwan, things you can\'t get in the states.<br>
<br>
We specialize in parts for the new Zuma 125, custom exhausts, shocks lights, body panels, click the scooter to the left to see what\'s available.<br>
<br>
Don\'t see what you are looking for? Shoot me an email on the requests page, I will do my best to see if it is something I can order.');

 

Would I delete everything up to this line:

 

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

 

?

Posted

Try it.

 

If it works the answer is yes.

 

If it doesnt restore and the answer is no.

 

Then would be a good time to post again.

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Posted

You would think that changing page text would be just a little more user friendly than this. I hope this isnt an omen of things to come with OScommerce.

 

 

Edit: alright, my guess about where to delete to was correct, I just didnt have this code at the end of my text ');

Posted

Sorry, but I didn't see the need to post things you weren't supposed to change.

 

Since much of osC is PHP the more you understand it the easier things will be.

 

Maybe that's not very reassuring, but it is true.

:blush:

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted
Sorry, but I didn't see the need to post things you weren't supposed to change.

 

Since much of osC is PHP the more you understand it the easier things will be.

 

Maybe that's not very reassuring, but it is true.

:blush:

 

Sorry, I was starting to get sort of pissy with the program, I think I'm starting to pick it up though. Im not too good with raw html. :blush:

Archived

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

×
×
  • Create New...