Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Parse error: parse error, unexpected T_STRING


jdimaging

Recommended Posts

First may I say what a wonderful program and what a great job has been done making contributions.

 

I dowloaded the newest 2.2 a couple nights ago and everything is working wonderful, but... isn't there always a but!

 

I am trying to edit the main text on the first page and when I go to the file:

 

catalog//includes/languages/english/index.php to edit the text it seems where ever I type anything or edit the file I get a parse error:

 

Parse error: parse error, unexpected T_STRING in /usr/local/psa/home/vhosts/imaginationmarket.org/httpdocs/catalog/includes/languages/english/index.php on line 19

 

Below is the file info. I keep thinking I have it right for defining text main, but obviously am doing something wrong as whatever this does is messing up the titles etc. Left the page on error at:

 

Catalog

 

 

<?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 maybe how I do the text, no matter what I try I seem to have it wrong');

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

}

?>

 

Thanks for any help.

 

Darlene Janssen

Link to comment
Share on other sites

The error is here (line 19)

 

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

 

 

should be:

 

 

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

 

 

 

You have another on line 37 :blink:

Link to comment
Share on other sites

Thank you for the quick response, unfortunately no luck. I was thinking any time you use the apostrophe you would need to do something like this so copied your code for the first error and then took out the apostrophe and put in what is new here in line 37. No luck.

 

This is what I have now

 

define('TEXT_MAIN', 'this is maybe how I do the text, no matter what I try I seem to have it wrong.');

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

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

define('HEADING_TITLE', 'Categories');

}

?></QUOTE>

 

Any more ideas as I think this is is the actual code being distributed in the latest release so I must be missing something as I only tried to change the text?

 

Thanks. Darlene

Link to comment
Share on other sites

Tried it again, everytime I put in the slash in front of the apostrophe and save the file it removes the slash when I go back into the file and the parse error keeps showing?

 

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

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...