Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2008
    Posts
    55
    Plugin Contributions
    0

    Default Parse error: syntax error on Category page

    Parse error: syntax error, unexpected T_CASE in /home/spectech/spectechind.com/store/admin/categories.php on line 281


    Under Admin - Catalog - Categories this error report is generated.

    No clue what happened. Any ideas or suggestions. Please let me know if you need additional information.

    Thanks.

  2. #2
    Join Date
    Oct 2008
    Posts
    55
    Plugin Contributions
    0

    Default Parse error: syntax error on Category page

    Parse error: syntax error, unexpected T_CASE in /home/spectech/spectechind.com/store/admin/categories.php on line 281


    Under Admin - Catalog - Categories this error report is generated.

    No clue what happened. Any ideas or suggestions. Please let me know if you need additional information.

    Thanks.

  3. #3
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,144
    Plugin Contributions
    11

    Default Re: Parse error: syntax error on Category page

    look in the file for some character that is not allowed

  4. #4
    Join Date
    Oct 2008
    Posts
    55
    Plugin Contributions
    0

    Default Re: Parse error: syntax error on Category page

    Well for whatever reason the following lines of codes were the issue. I have deleted the entire part and it is back to normal now.

    zen_redirect(zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $categories_id));
    break;

    // bof: categories meta tags
    case 'update_category_meta_tags':
    // add or update meta tags
    //die('I SEE ' . $action . ' - ' . $_POST['categories_id']);
    $categories_id = $_POST['categories_id'];
    $languages = zen_get_languages();
    for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
    $language_id = $languages[$i]['id'];
    $check = $db->Execute("select *
    from " . TABLE_METATAGS_CATEGORIES_DESCRIPTION . "
    where categories_id = '" . (int)$categories_id . "'
    and language_id = '" . (int)$language_id . "'");
    if ($check->RecordCount() > 0) {
    $action = 'update_category_meta_tags';
    } else {
    $action = 'insert_categories_meta_tags';
    }

    $sql_data_array = array('metatags_title' => zen_db_prepare_input($_POST['metatags_title'][$language_id]),
    'metatags_keywords' => zen_db_prepare_input($_POST['metatags_keywords'][$language_id]),
    'metatags_description' => zen_db_prepare_input($_POST['metatags_description'][$language_id]));

    if ($action == 'insert_categories_meta_tags') {
    $insert_sql_data = array('categories_id' => $categories_id,
    'language_id' => $language_id);
    $sql_data_array = array_merge($sql_data_array, $insert_sql_data);

    zen_db_perform(TABLE_METATAGS_CATEGORIES_DESCRIPTION, $sql_data_array);
    } elseif ($action == 'update_category_meta_tags') {
    if ($sql_data_array['metatags_title'] == '' && $sql_data_array['metatags_keywords'] == '' && $sql_data_array['metatags_description'] == '') {
    $db->Execute("DELETE FROM " . TABLE_METATAGS_CATEGORIES_DESCRIPTION . " WHERE categories_id = '" . (int)$categories_id . "' and language_id = '" . (int)$language_id . "'");
    } else {
    zen_db_perform(TABLE_METATAGS_CATEGORIES_DESCRIPTION, $sql_data_array, 'update', "categories_id = '" . (int)$categories_id . "' and language_id = '" . (int)$language_id . "'");
    }
    }


    zen_redirect(zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $categories_id));
    break;

 

 

Similar Threads

  1. Replies: 5
    Last Post: 27 Sep 2014, 10:53 AM
  2. Install: Parse error: syntax error, unexpected '/' in /includes/application_top.php
    By dlucarelli in forum Installing on a Linux/Unix Server
    Replies: 8
    Last Post: 26 Aug 2010, 02:08 PM
  3. Login error and Parse error: Syntax error...
    By TzuLady in forum Basic Configuration
    Replies: 1
    Last Post: 15 Apr 2010, 07:32 AM
  4. Blank page and PHP Parse error: syntax error
    By Spiritus in forum General Questions
    Replies: 8
    Last Post: 17 Mar 2010, 07:16 PM
  5. Replies: 4
    Last Post: 30 Aug 2009, 09:26 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR