Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Error in Categories.php


Guest

Recommended Posts

Posted

This is the error message I am getting when trying to access the Catalog Menu in Administration:

 

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /mnt/w0402/d16/s27/b02a8d00/www/avantijewelers.us/store/catalog/admin/categories.php on line 379

 

I have looked over the code myself, but I don't see what is wrong with it.

 

 

Here is the code from the file that I believe contains the error, though it might be elsewhere so if anyone has an idea but wants to see more of the code, just message me.

 

The error is in the line containing if (isset($HTTP_GET_VARS['pID']) && empty($HTTP_POST_VARS)) {

which is about the third paragraph.

 

 

if ($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' => '',
                      'products_ship_sep' =>");

   $pInfo = new objectInfo($parameters);

   if (isset($HTTP_GET_VARS['pID']) && empty($HTTP_POST_VARS)) {
     $product_query = tep_db_query("select pd.products_name, pd.products_description, 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 , p.products_ship_sep 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;
   }

Posted
'products_status' => '',

'products_tax_class_id' => '',

'manufacturers_id' => '',

'products_ship_sep' =>");

 

$pInfo = new objectInfo($parameters);

 

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

 

The bolded line should be:

 

'products_ship_sep' =>"");

 

or

 

'products_ship_sep' =>'');

Contributions

 

Discount Coupon Codes

Donations

Posted

Thats about the dumbest damned mistake I ever seen but thanks.

Archived

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

×
×
  • Create New...