Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

Hi all,

 

when i go to my admin panel, everything works fine... except when i click on "catalog" (http://www.shopname.com/admin/categories.php?selected_box=catalog)

 

I'm getting this error and don't now how to fix it:

 

Parse error: syntax error, unexpected T_IF in /home/#shopname#/public_html/admin/categories.php on line 18

 

My admin/categories.php looks like this (first 50 lines):

 

<?php
/*
 $Id: categories.php,v 1.146 2003/07/11 14:40:27 hpdl Exp $

*/

 require('includes/application_top.php');

 require(DIR_WS_CLASSES . 'currencies.php');
 $currencies = new currencies();

 $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '')
// Ultimate SEO URLs v2.1
// If the action will affect the cache entries
//	if ( eregi("(insert|update|setflag)", $action) ) include_once('includes/reset_seo_cache.php');
# cDynamic Meta Tags 
 // If the action will affect the cache entries
 if ( eregi("(insert|update|setflag)", $action) ) include_once('includes/reset_meta_cache.php');

if (tep_not_null($action)) {
switch ($action) {
  case 'setflag':
	if ( ($HTTP_GET_VARS['flag'] == '0') || ($HTTP_GET_VARS['flag'] == '1') ) {
	  if (isset($HTTP_GET_VARS['pID'])) {
		tep_set_product_status($HTTP_GET_VARS['pID'], $HTTP_GET_VARS['flag']);
	  }

	  if (USE_CACHE == 'true') {
		tep_reset_cache_block('categories');
		tep_reset_cache_block('also_purchased');
	  }
	}

	tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $HTTP_GET_VARS['cPath'] . '&pID=' . $HTTP_GET_VARS['pID']));
	break;
  case 'insert_category':
  case 'update_category':
	if (isset($HTTP_POST_VARS['categories_id'])) $categories_id = tep_db_prepare_input($HTTP_POST_VARS['categories_id']);
	$sort_order = tep_db_prepare_input($HTTP_POST_VARS['sort_order']);

	$sql_data_array = array('sort_order' => $sort_order);

	if ($action == 'insert_category') {
	  $insert_sql_data = array('parent_id' => $current_category_id,
							   'date_added' => 'now()');

	  $sql_data_array = array_merge($sql_data_array, $insert_sql_data);

	  tep_db_perform(TABLE_CATEGORIES, $sql_data_array);

 

line 18 is:

 

  if ( eregi("(insert|update|setflag)", $action) ) include_once('includes/reset_meta_cache.php');

 

Any help is appreciated!

  • 7 months later...
Posted

im with the same problem but for me are in line 25, i dont know how fix this, are happening after the SEO URLS added

 

please anyone can help?

Posted

Post the first 30 or so lines of your code.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...