Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

problem after installing category descriptions!!!


Guest

Recommended Posts

Here is the error I get when I try to go to the categories section in the admin panel;

 

Parse error: parse error in /var/www/html/catalog/admin/categories.php on line 663

 

It looks like it's complaining about one of the changes I had to make for the contribution. Here is the instructions for that particular change that it's complaining about;

 

11)

>>>>>>> Locate the following line (approximately line 560):

 

    if ($action == 'new_product') {

 

>>>>>>> CHANGE that line to:

 

    } elseif ($action == 'new_product') {

 

and here is the code I've got for that particular php tag;

 

<?php

  } elseif ($action == 'new_product') {

    $parameters = array('products_name' => '',

                      'products_description' => '',

                      'products_url' => '',

                      'products_id' => '',

                      'products_quantity' => '',

                      'products_model' => '',

                      'products_image' => '',

                      'products_price' => '',

                      'products_weight' => '',

                      'products_date_added' => '',

                      'products_last_modified' => '',

                      'products_date_available' => '',

                      'products_status' => '',

                          'products_tax_class_id' => '',

                      'manufacturers_id' => '');

 

    $pInfo = new objectInfo($parameters);

 

    if (isset ($HTTP_GET_VARS['pID']) && (!$HTTP_POST_VARS) ) {

      $product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_head_title_tag, pd.products_head_desc_tag, pd.products_head_keywords_tag, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'");

      $product = tep_db_fetch_array($product_query);

 

      $pInfo->objectInfo($product);

    } elseif (tep_not_null($HTTP_POST_VARS)) {

      $pInfo->objectInfo($HTTP_POST_VARS);

      $products_name = $HTTP_POST_VARS['products_name'];

      $products_description = $HTTP_POST_VARS['products_description'];

      $products_url = $HTTP_POST_VARS['products_url'];

    }

 

    $manufacturers_array = array(array('id' => '', 'text' => TEXT_NONE));

    $manufacturers_query = tep_db_query("select manufacturers_id, manufacturers_name from " . TABLE_MANUFACTURERS . " order by manufacturers_name");

    while ($manufacturers = tep_db_fetch_array($manufacturers_query)) {

      $manufacturers_array[] = array('id' => $manufacturers['manufacturers_id'],

                                    'text' => $manufacturers['manufacturers_name']);

    }

 

    $tax_class_array = array(array('id' => '0', 'text' => TEXT_NONE));

    $tax_class_query = tep_db_query("select tax_class_id, tax_class_title from " . TABLE_TAX_CLASS . " order by tax_class_title");

    while ($tax_class = tep_db_fetch_array($tax_class_query)) {

      $tax_class_array[] = array('id' => $tax_class['tax_class_id'],

                                'text' => $tax_class['tax_class_title']);

    }

 

    $languages = tep_get_languages();

 

    if (!isset($pInfo->products_status)) $pInfo->products_status = '1';

    switch ($pInfo->products_status) {

      case '0': $in_status = false; $out_status = true; break;

      case '1':

      default: $in_status = true; $out_status = false;

    }

?>

 

Does anyone have any idea what the problem is? Thanks for any help, I've been trying to fix the problem for the last hour.

Link to comment
Share on other sites

It's not possible from that to tell exactly which line the problem is on. Best advice is - install a plain text editor with line number abilities (Text Pad or Crimson Editor to name but two), and then you'll be able to see the actual line that the problem is on. Makes it much easier to track things down.

 

Vger

Link to comment
Share on other sites

...Does anyone have any idea what the problem is? Thanks for any help, I've been trying to fix the problem for the last hour.

...and you've given up already ??? No wonder the forum is full of lame posts

 

Rich.

Link to comment
Share on other sites

It's not possible from that to tell exactly which line the problem is on.  Best advice is - install a plain text editor with line number abilities (Text Pad or Crimson Editor to name but two), and then you'll be able to see the actual line that the problem is on.  Makes it much easier to track things down.

 

Vger

 

I'm already using dwmx for code purposes. I've got the line number activated in the options (it comes activated right off the bat). that's how I knew where the problem was and that's why I pasted that bit of code. It's saying the error is there.

Link to comment
Share on other sites

...and you've given up already ??? No wonder the forum is full of lame posts

 

Rich.

 

you're an idiot. dont reply to posts with useless garbage. Im simply askign for help, retard. You're the reason this forum has stupid posts, retards like you come on talking shit.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...