Jump to content

[SOLVED] Parse error: syntax error, unexpected ...


randallc

Recommended Posts

PLEASe HELP... business is at a stand still because of a parse error.

I am getting an error

Parse error: syntax error, unexpected '{'in /home/sugarlan/public_html/includes/languages/english/index.php on line 18

 

index.php lines 1-25

<?php

/*

  $Id: index.php,v 1.1 2003/06/11 17:37:59 hpdl Exp $

 

  osCommerce, Open Source E-Commerce Solutions

  http://www.oscommerce.com

 

  Copyright © 2003 osCommerce

 

  Released under the GNU General Public License

*/

 

  require('includes/application_top.php');

 

// the following cPath references come from application_top.php

  $category_depth = 'top';

  if (isset($cPath) && tep_not_null($cPath)) {

    $categories_products_query = tep_db_query("select count(*) as total from " .  TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");

    $cateqories_products = tep_db_fetch_array($categories_products_query);

    if ($cateqories_products['total'] > 0) {

      $category_depth = 'products'; // display products

    } else {

      $category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'");

      $category_parent = tep_db_fetch_array($category_parent_query);

      if ($category_parent['total'] > 0) {

        $category_depth = 'nested'; // navigate through the categories

      } else {

        $category_depth = 'products'; // category has no products

Sorry I posted the wrong index.php... the problem is still on line 18 in the following:

 

<?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('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', 'Your Slogan Here!!');

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

  define('HEADING_TITLE', 'Categories');

}

?>

 

 

Now Im getting a different error.

 

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/sugarlan/public_html/includes/languages/english/index.php on line 34

 

I changed line 18 already

 

<?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('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', 'Lets 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', 'Your Slogan Here!!');

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

  define('HEADING_TITLE', 'Categories');

}

?>

 

That did not work. Would anybody care to edit my index.php file directly in my cpanel. If you have a paypal account I could even shoot you a few dollars. But I need it done yesterday.

 

Are you getting the same error?

 

Try this:

<?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('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', 'Lets 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', '<strong>Show:</strong>');
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', 'Your Slogan Here!!');
	} elseif ($category_depth == 'nested') {
define('HEADING_TITLE', 'Categories');
}
?>

 

If that doesn't work, contact me on one of my messengers or PM the details and I'll fix it.

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.