Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

parse error, unexpected '<'


Guest

Recommended Posts

Posted

I am putting in the MSRP contributions and I have hit a small snag. So small that I can't find it. Can someone else please take a look?

 

The error I get is:

Parse error: parse error, unexpected '<' in /home/********/public_html/catalog/admin/categories.php on line 379

 

I am pasting line 350 - 400. The red line is MY line 379 (though how accurate that is I am not sure).

 

<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

if ($action == 'new_product') {

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

'products_description' => '',

'products_url' => '',

'products_id' => '',

'products_quantity' => '',

'products_model' => '',

'products_image' => '',

'products_msrp' => '',

'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']) && empty($HTTP_POST_VARS)) {

<tr bgcolor="#ebebff">

<td class="main"><?php echo TEXT_PRODUCTS_PRICE_MSRP; ?></td>

<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '?' . tep_draw_input_field('products_msrp', $pInfo->products_msrp); ?></td>

</tr>

$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 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']);

}

 

 

Thanks!

Posted

Use a good plain text editor like Text Pad or Crimson Editor (both free downloads) and it will show you exactly what your line numbers are. You'll then be able to identify the exact line and find the error.

 

Vger

Posted
Use a good plain text editor like Text Pad or Crimson Editor (both free downloads) and it will show you exactly what your line numbers are. You'll then be able to identify the exact line and find the error.

 

Vger

 

Thanks but I did do that. I use Crimson Editor and the red line is my line 379. But I don't see an extra > there and if I remove one of the ones that ARE there, I will get another error.

 

Which is why I pasted the additional lines, in case there was an error farther up or down that was causing a chain reaction. I am not a php guru and don't know how to spot these errors.

Posted

Agh sorry, didn't realise on first site but all of the code pasted below is in the wrong place. You can't use standard html inside an open php tag - which is why you're getting the 'unexpected <' error.

<tr bgcolor="#ebebff">
<td class="main"><?php echo TEXT_PRODUCTS_PRICE_MSRP; ?></td>
<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_msrp', $pInfo->products_msrp); ?></td>
</tr>

 

Vger

Posted
Agh sorry, didn't realise on first site but all of the code pasted below is in the wrong place. You can't use standard html inside an open php tag - which is why you're getting the 'unexpected <' error.

<tr bgcolor="#ebebff">
<td class="main"><?php echo TEXT_PRODUCTS_PRICE_MSRP; ?></td>
<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_msrp', $pInfo->products_msrp); ?></td>
</tr>

 

Vger

 

Thank you, that helped me find the error so now it's fixed. Thanks!

Archived

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

×
×
  • Create New...