Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PHP Parse error: syntax error, unexpected T_IF in ****/admin/categories.php on line 405


Guest

Recommended Posts

OKay I've blurry-eyed and tired. Can't find the answer I'm looking for. Tried here. Tried PHP site. I hope one of you will pity me and help me find the answer.

 

Here's the error message from my CheckErrorLogs from my ISP.

 

PHP Parse error: syntax error, unexpected T_IF in /hermes/web06/b2749/moo.arizon8/oscommerce/admin/categories.php on line 405

 

Here the code around it:

<!-- body //-->
<table border="0" width="100%" cellspacing="2" cellpadding="2">
 <tr>
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
   </table></td>
<!-- body_text //-->
   <td width="100%" valign="top">
<?php
   //MVS Many additions here, the order they are listed is very important, all new fields have vendor or vendors in the name, (ie, "vendors_product_price,")
 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' => '',
                      // MVS start
                      'vendors_product_price' => '',
                      'vendors_prod_comments' => '',
                      'vendors_prod_id' => '',
                      'vendors_id' => '',
                      //MVS end
//---FedEx Freight Modification START ---//	
                      'products_fxf_class' => '',
                      'products_fxf_desc' => '',
                      'products_fxf_nmfc' => '',
                      'products_fxf_haz' => '',
                      'products_fxf_freezable' => '',
//---FedEx Freight Modification END ---//
                      'manufacturers_id' => '');

   $pInfo = new objectInfo($parameters);

 

The line in question is: if ($action == 'new_product') {

 

One other thing. I have no access to the admin/catalog . Absolutely nothing on the page. Everything else okay as far as I can see.

 

I can't find anything wrong. Is there anyone out there with an answer? Thank you all most kindly.

 

nea-esco

Link to comment
Share on other sites

What version of scC are you using?

I am looking at page:

\admin\categories.php Line 405

and I see

$languages = tep_get_languages();

 

Have you done any editing to the page?

If not and you are sure it is default try copying a fresh copy over it. It would be a good idea to back it up before copying over - even if it does cause errors.

 

PHP Parse error: syntax error, unexpected T_IF can be a missing {,(,; ...

Lloyd

Link to comment
Share on other sites

What version of scC are you using?

I am looking at page:

\admin\categories.php Line 405

and I see

$languages = tep_get_languages();

 

Have you done any editing to the page?

If not and you are sure it is default try copying a fresh copy over it. It would be a good idea to back it up before copying over - even if it does cause errors.

 

PHP Parse error: syntax error, unexpected T_IF can be a missing {,(,; ...

 

Sorry if I was not clear: I tried to include the contribs in the copy. There are three contribs affecting this file: MVS, Header SEO, fxFreight. I tried to indicate which line was the 405 in question. Actually I've grown my confident that problem really is in the manner the contribs were merged. I just noticed below (around 437 where it starts:

 

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

 

The three contribs all totally repeated each other in complete passages (with their own additions). I have now combined all three with the additions included into one passage.

 

I don't know if this is the true result of the change but the error message above has now been replaced by a new one:

 

PHP Parse error: syntax error, unexpected T_STRING, expecting ')' in /hermes/web06/b2749/moo.arizon8/oscommerce/admin/categories.php on line 421

which is:

 

'vendors_product_price' => '',

 

The line immediately above it is: // MVS start

Well, anyway, thanks for the help so far. I'm mystified as to where this will all end.

(I still can't get anything when I try to see my Products page (blank).

 

Oh, yeah, I'm using osC version 2.2 mySQL 5.0.45 phpmyadmin 2.8.0.1 and php 4.4.7

 

Thanks for the help.

Link to comment
Share on other sites

Don't put comments inside your array definition.

 

 

And thank you for your attempt at helping. I say "attempt" only because I've eliminated all comments (added by each contrib) in this section. The error message is re-appearing --small change. Now reads:

 

PHP Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in ***oscommerce/admin/categories.php on line 420

 

with line 420 being: 'vendors_product_price' => '',

 

<?php
//MVS Many additions here, the order they are listed is very important, all new fields have vendor or vendors in the name, (ie, "vendors_product_price,")
 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' => '',
                      'vendors_product_price' => '',
                      'vendors_prod_comments' => '',
                      'vendors_prod_id' => '',
                      'vendors_id' => '',
                      'products_fxf_class' => '',
                      'products_fxf_desc' => '',
                      'products_fxf_nmfc' => '',
                      'products_fxf_haz' => '',
                      'products_fxf_freezable' => '',
                      'manufacturers_id' => '');

   $pInfo = new objectInfo($parameters);

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...