Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Error Line 19 - Main Text Edit


pbupgrad

Recommended Posts

I followed the instructions on the index page for editing the introductory text that exisits on the homepage. But when I did I got an error message for Line 19.

 

"Parse error: parse error, unexpected T_STRING in C:\Accounts\pbupgrad\wwwRoot\shopping\includes\languages\english\index.php on line 19"

 

Here's the php from the file: shopping//includes/languages/english/index.php

 

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

 

I put in the single quote as instructed but now the file is unhappy.

 

What am I not seeing?

Thanks,

Marianne

Link to comment
Share on other sites

Change

 

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

 

to

 

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

 

but DO NOT use the File Manager Editor, it has a bug in it that will strip out the \.

 

HTH

Tom

Link to comment
Share on other sites

This is not a good day. :)

 

So I tried your suggestion by copying the file into Dreamweaver and then uploading the file.

 

Now this is my error message

 

Warning: main(includes/languages/english/index.php): failed to open stream: Permission denied in C:\Accounts\pbupgrad\wwwRoot\shopping\index.php on line 33

 

Fatal error: main(): Failed opening required 'includes/languages/english/index.php' (include_path='.;c:\php4\pear') in C:\Accounts\pbupgrad\wwwRoot\shopping\index.php on line 33

 

I went back and undid all the editing I did and it still won't reset.

 

Here's the code in full. I am not versed in php. But I am learning fast that the syntax is very picky.

 

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

}

?>

 

Any suggestions? Thank you very much for your help.

 

Marianne

Link to comment
Share on other sites

Looks like when you ftp'd the file up the permissions got messed up. Check those first.

 

Then either start over with a new english.php and edit locally then ftp it up or make the following changes that I can see. You must escape single quotes for them to be displayed and not cause a parse error.

 

 

****************************************

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

 

make it

 

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

 

****************************************

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

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

 

make them

 

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

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

****************************************

 

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

 

make it

 

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

****************************************

 

Starting with a clean english.php would be better.......

 

HTH

Tom

Link to comment
Share on other sites

Thanks much. I got it to work again.

 

The \ scrubbing bug scrubs the \'s before I even knew they were there. Thanks for that tip. I have learned my lesson and will not open files with it anymore.

 

Thanks again.

Marianne

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...