Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Oh dear god HELP


Guest

Recommended Posts

I'm not a newbie i'm just tired. >_<

 

I'm trying to get rid of the default intro and i messed it up. this is the error i get now when i go to my index.php

 

Parse error: parse error, unexpected T_STRING in /home/iwaver2/public_html/includes/languages/english/index.php on line 14

 

I don't totally understand what i did worng. I wanted to change the text and end up with a headache and sore eyes. I've underlined what i worked on.

Did i save the original?? Course not......

 

Any help would be great anything at all

 

Please? :blush:

 

 

here's my default page as it errors now

 

<?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','Welcome to Nanospeed Canada's home of micro RC'. <b>Take your time and become familiar with our new online store</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');

}

?>

Link to comment
Share on other sites

I'm not a newbie i'm just tired. >_<

 

I'm trying to get rid of the default intro and i messed it up. this is the error i get now when i go to my index.php

 

Parse error: parse error, unexpected T_STRING in /home/iwaver2/public_html/includes/languages/english/index.php on line 14

 

I don't totally understand what i did worng. I wanted to change the text and end up with a headache and sore eyes. I've underlined what i worked on.

Did i save the original?? Course not......

 

Any help would be great anything at all

 

Please? :blush:

here's my default page as it errors now

 

<?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','Welcome to Nanospeed Canada's home of micro RC'. <b>Take your time and become familiar with our new online store</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');

}

?>

 

Empty your text main define like this

define('TEXT_MAIN','')

Everything you type must stay in between those opening and closing quote which also means you can not use this character, the quote, for anything you type.

So when typing Canada's Home you can not use the ' unless you do it like

Canada\'s Home

With that in mind you should not have anymore headaches. And, as far as you haven't read it already, do NOT use the osCommerce file manager for editing files PLUS don't forget to backup a file before you start editing/working on it. In case something goes horribly wrong like now you can always fall back on that working backup file (not good for the pharmaceutical industry but better for you and your wallet :D )

Link to comment
Share on other sites

Empty your text main define like this

 

Everything you type must stay in between those opening and closing quote which also means you can not use this character, the quote, for anything you type.

So when typing Canada's Home you can not use the ' unless you do it like

 

With that in mind you should not have anymore headaches. And, as far as you haven't read it already, do NOT use the osCommerce file manager for editing files PLUS don't forget to backup a file before you start editing/working on it. In case something goes horribly wrong like now you can always fall back on that working backup file (not good for the pharmaceutical industry but better for you and your wallet :D )

 

 

Ok I've followed your advice to the letter. And now i'm getting this error

 

Parse error: parse error, unexpected T_LNUMBER in /home/iwaver2/public_html/includes/languages/english/index.php on line 14

 

Here is the code in question.

 

define('TEXT_MAIN',")Welcome to Nanospeed Canadas home of micro RC.<b>Take your time and become familiar with our new online store Any information seen on these products is to be treated as fictional.<br>

Link to comment
Share on other sites

Ok I've followed your advice to the letter. And now i'm getting this error

 

Parse error: parse error, unexpected T_LNUMBER in /home/iwaver2/public_html/includes/languages/english/index.php on line 14

 

Here is the code in question.

 

define('TEXT_MAIN',")Welcome to Nanospeed Canadas home of micro RC.<b>Take your time and become familiar with our new online store Any information seen on these products is to be treated as fictional.<br>

 

Nano,

 

Look good at your own sample and these samples

define('TEXT_MAIN','This is how it is supposed to be');
or
define('TEXT_MAIN','Welcome to Nanospeed Canada\'s home of micro RC.<br><b>You see how I stay within the opening and closing quote with this text ?</b>');

Link to comment
Share on other sites

Nano,

 

Look good at your own sample and these samples

define('TEXT_MAIN','This is how it is supposed to be');
or
define('TEXT_MAIN','Welcome to Nanospeed Canada\'s home of micro RC.<br><b>You see how I stay within the opening and closing quote with this text ?</b>');

 

 

Ok that explains it to my overly tired mind. I understand what i did wrong. :blush:

Made the changes and I'm back up and running. Thanks, really appreciate the help so fast. Now to add the yellow sticky note "save your work dumbass" to my monitor.

Link to comment
Share on other sites

Now to add the yellow sticky note "save your work dumbass" to my monitor.

 

Craig,

 

Every start can be difficult so no need to be harsh on yourself. Just remember to make that backup before you start 'digging' and you will stay a lot happier if something doesn't work out as you expected.

 

Cheers,

Howard

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...