Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Using built in editor causes a Parse Error


theMusicMan

Recommended Posts

Hi All

 

I have been trying to use the built in language editor to personalise my eShop. I have discivered a problem and need some clarification as to wether it is a known bug with osCommerce or is a problem with my configuration/PC Setup.

 

I am trying to personalise the index.php language file - when I do so withe the built in editor I get this problem...

 

Parse error: parse error in ......my web root location/dev/phpBB2/eshop/catalog/catalog/includes/languages/english/index.php on line 19

 

However, when I make the same edit with ConTEXT - it works...:S

 

Also, if I simply press the 'Save' button with the built in editor i.e. no edit of the file, simply overwrite by resaving - I get the same error...

 

Anyone shed some light on this for me please...:?:

John

Link to comment
Share on other sites

Ok, first step is to check out line 19 of the file mentioned.

 

Check that it has a ';' at the end of the line.

If it does, can you post lines 15 - 25 here and we'll see if we can find the problem.

 

Cheers,

Tony

"The price of success is perseverance. The price of failure comes much cheaper."

Link to comment
Share on other sites

Hi TB...

 

Thanks for getting back to me... here's the whole code of that file...

 

<?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 (c) 2003 osCommerce



 Released under the GNU General Public License

*/



define('TEXT_MAIN', 'Welcome to the new <b>tMP eShop</b>.  At tMP eShop we are able to offer personalised tMP one-off products at reasonable rates.  Please browse through our selection and make your choice. ');

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 at tMP eShop');

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

}

?>

 

Line 19 of that file is...

 

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

John

Link to comment
Share on other sites

Ok, this looks like a problem with the internal editor.

 

What it's doing is removing the slashes from the text.

 

The you see in your line 19 is there to tell PHP that the following ' is part of the text and not the PHP code. What's happening is that the internal editor is removing that and therefore PHP thinks the following is now part of the PHP code and causing the errors.

 

For the time being, I'd report a bug here and stick to editing the files using your text editor and uploading them on completion.

 

HTH,

Tony

"The price of success is perseverance. The price of failure comes much cheaper."

Link to comment
Share on other sites

OK Tony... thanks for getting back to me so promptly....

 

I'm attempting to make the look and feel of my eShop the same as my main www site www.themouthpiece.com - which also is a php application.

 

Not difficult, but then again, when you know nothing about php, CSS etc... just takes a little longer.

 

Found a great resource here though....:) thanks for your help...

 

John

John

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...