Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Weird osc error! Osc is speaking **** to me?!?


Guest

Recommended Posts

Well it is usually rare that I will get stumped but this one takes the cake.

 

I am getting an error on my product info page:

 

Parse error: parse error, unexpected $ in /usr/local/psa/home/vhosts/mygeekshop.com/httpdocs/store/catalog/product_info.php on line 477

 

It can also be seen at http://www.mygeekshop.com/store/catalog/pr...?products_id=41

 

Now call me silly but the error is pointing to line 477 on the product info page. However I do not have a 475 on the page only a 476.

Below is the full page code:

 

<?php

/*

 $Id: product_info.php,v 1.6 2003/02/10 20:52:11 wilt Exp $



 osCommerce, Open Source E-Commerce Solutions

 http://www.oscommerce.com



 Copyright (c) 2002 osCommerce



 Released under the GNU General Public License

*/



 require('includes/application_top.php');



 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO);

?>

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html <?php echo HTML_PARAMS; ?>>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">

<?php

// BOF: WebMakers.com Changed: Header Tag Controller v1.0

// Replaced by header_tags.php

if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {

 require(DIR_WS_INCLUDES . 'header_tags.php');

} else {

?> 

 <title>mygeekshop.com - where being geek is cool™</title>

<?php

}

// EOF: WebMakers.com Changed: Header Tag Controller v1.0

?>

<base href="<?php echo (getenv('HTTPS') == 'on' ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">

<link rel="stylesheet" type="text/css" href="<? echo THEMA_STYLE;?>">

<script language="javascript"><!--

function popupWindow(url) {

 window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizab
le=yes,copyhistory=no,width=500,height=500,screenX=150,screenY=150,top=150,left=1
50')

}

//--></script>

</head>

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">

<!-- header //-->

<?php require(DIR_WS_INCLUDES . 'header.php'); ?>

<!-- header_eof //-->



<!-- body //-->

<table border="0" width="780" cellspacing="1" cellpadding="1" align="center" >

 <tr>

<!-- body_text //-->

   <td width="100%" valign="top" background="images/categorybanners/background_banner.gif"><form name="cart_quantity" method="post" action="<?php echo tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product', 'NONSSL'); ?>">

       <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">

         <?php

 $product_info = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, p.products_mimage, p.products_bimage, p.products_subimage1, p.products_subimage2, p.products_subimage3, p.products_subimage4, p.products_subimage5, p.products_subimage6, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and pd.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and pd.language_id = '" . $languages_id . "'");

 if (!tep_db_num_rows($product_info)) { // product not found in database

?>

         <tr> 

           <td colspan="2" class="main"><br> <?php echo TEXT_PRODUCT_NOT_FOUND; ?></td>

         </tr>

         <tr> 

           <td colspan="2" align="right"><br> <a href="<?php echo tep_href_link(FILENAME_DEFAULT, '', 'NONSSL'); ?>"><?php echo tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></a></td>

         </tr>

         <?php

 } else {

   tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . $HTTP_GET_VARS['products_id'] . "' and language_id = '" . $languages_id . "'");

   $product_info_values = tep_db_fetch_array($product_info);



   if ($new_price = tep_get_products_special_price($product_info_values['products_id'])) {

     $products_price = '<s>' . $currencies->display_price($product_info_values['products_price'], tep_get_tax_rate($product_info_values['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info_values['products_tax_class_id'])) . '</span>';

   } else {

     $products_price = $currencies->display_price($product_info_values['products_price'], tep_get_tax_rate($product_info_values['products_tax_class_id']));

   }

   $products_attributes = tep_db_query("select popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . $HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . $languages_id . "'");

   if (tep_db_num_rows($products_attributes)) {

     $products_attributes = '1';

   } else {

     $products_attributes = '0';

   }

?>

         <tr> 

           <td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2">

               <tr height="40"> 

                 <td width="44%" class="pageHeading"><?php echo $product_info_values['products_name']; ?></td>

                 <td width="56%" align="left" class="pageHeading"> </td>

               </tr>

               <?php

   if (PRODUCT_LIST_MODEL) {

     echo '          <tr>' . "n" .

          '            <td colspan="2" class="pageHeading">' . $product_info_values['products_model'] . '</td>' . "n" .

          '          </tr>' . "n";

   }

?>

             </table></td>

         </tr>

         <tr> 

           <td width="35%" rowspan="2" valign="top"> <table border="0" cellspacing="0" cellpadding="2" align="center">

               <?php

   $image = $product_info_values['products_image'];

   $bimage = $product_info_values['products_image'];

   if ($product_info_values['products_mimage'] != '') $image = $product_info_values['products_mimage']; 

   if ($product_info_values['products_bimage'] != '') $bimage = $product_info_values['products_bimage']; 

   if ($image != '') {

?>

               <tr> 

                 <td align="center" class="smallText"> <script language="javascript"><!--

document.write('<?php echo '<a href="javascript:popupWindow('' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info_values['products_id']) . '')">' . tep_image(DIR_WS_IMAGES . $image, addslashes($product_info_values['products_name']), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');

//--></script> <noscript>

                   <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $bimage) . '">' . tep_image(DIR_WS_IMAGES . $image, $product_info_values['products_name'], MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?> 

                   </noscript> </td>

               </tr>

               <?php

   }

?>

             </table></td>

           <td valign="top"><table width="250" border="0" align="left" cellpadding="0" cellspacing="0">

               <tr> 

                 <td background="images/productinfo/product_info_stock_middlebackground.gif"> 

                   <?php 

 $prod_quantity = tep_get_products_stock($products_id); 

 switch ($prod_quantity) { 

     case 0: 

     print '<img src="images/productinfo/product_info_stock_soldout.gif" border="0">'; 

     break; 

     case 1: 

     print '<img src="images/productinfo/product_info_stock_limitedstock.gif" border="0">'; 

     break; 

     case 2: 

     print '<img src="images/productinfo/product_info_stock_limitedstock.gif" border="0">'; 

     break; 

     case 3: 

     print '<img src="images/productinfo/product_info_stock_instock.gif" border="0">'; 

     break; 

     case 4: 

     print '<img src="images/productinfo/product_info_stock_instock.gif" border="0">'; 

     break; 

     default: 

     print '<img src="images/productinfo/product_info_stock_instock.gif" border="0">'; 

 } 

 ?>

                 </td>

               </tr>

               <tr> 

                 <td background="images/productinfo/product_info_stock_middlebackground.gif"><div align="center" class="pageHeading"> 

                     <div align="left"><font size="2" face="Tahoma" class="pageHeading"> 

                       </font> 

                       <table width="200" border="0" align="center" cellpadding="0" cellspacing="0">

                         <tr> 

                           <td align="left" class="pageHeading">Our Price: <?php echo $products_price; ?> </font></strong> 

                           </td>

                         </tr>

                       </table>

                     </div>

                   </div></td>

               </tr>

               <tr> 

                 <td height="4" background="images/productinfo/product_info_stock_middlebackground.gif"> 

                   <div align="left"> 

                     <table width="200" border="0" align="center" cellpadding="0" cellspacing="0">

                       <tr> 

                         <td><br>

                           <input type="hidden" name="products_id22" value="<?php echo $product_info_values['products_id']; ?>"> 

                           <?php echo tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?> 

                         </td>

                       </tr>

                     </table>

                   </div></td>

               </tr>

               <tr> 

                 <td background="images/productinfo/product_info_stock_middlebackground.gif"><div align="center"><img src="images/productinfo/product_info_smallline.gif" width="50" height="10"><img src="images/productinfo/product_info_smallline.gif" width="50" height="10"><img src="images/productinfo/product_info_smallline.gif" width="50" height="10"><img src="images/productinfo/product_info_smallline.gif" width="50" height="10"></div></td>

               </tr>

               <tr> 

                 <td height="1" background="images/productinfo/product_info_stock_middlebackground.gif"><table width="200" border="0" align="center" cellpadding="0" cellspacing="0">

                     <tr> 

                       <td align="left" class="main">Tell us what you think about 

                         this item and go into the monthly draw to win a $50 

                         My Geekshop Gift Voucher.</td>

                     </tr>

                   </table></td>

               </tr>

               <tr> 

                 <td height="1" background="images/productinfo/product_info_stock_middlebackground.gif"><table width="200" border="0" align="center" cellpadding="0" cellspacing="0">

                     <tr> 

                       <td><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, substr(tep_get_all_get_params(), 0, -1)) . '">' . tep_image_button('button_write_review.gif', IMAGE_BUTTON_WRITE_REVIEW) . '</a>'; ?></td>

                     </tr>

                   </table></td>

               </tr>

               <tr> 

                 <td height="10"><img src="images/productinfo/product_info_stock_bottom.gif" width="250" height="15"></td>

               </tr>

               <tr> 

                 <td align="left" class="main"><a href="tell_a_friend.php"><img src="images/productinfo/product_info_emailfriend.gif" width="40" height="40" border="0" align="middle"></a> 

                   <strong>E-mail this gift idea to a friend</strong></td>

               </tr>

             </table>

             

           </td>

         </tr>

         <tr> 

           <td align="left" class="main"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info_values['products_date_available'])); ?></font></td>

         </tr>

         <tr> 

           <td height="10" colspan="2"><div align="center"><img src="images/productinfo/product_info_smallline.gif" width="50" height="10"><img src="images/productinfo/product_info_smallline.gif" width="50" height="10"><img src="images/productinfo/product_info_smallline.gif" width="50" height="10"><img src="images/productinfo/product_info_smallline.gif" width="50" height="10"><img src="images/productinfo/product_info_smallline.gif" width="50" height="10"><img src="images/productinfo/product_info_smallline.gif" width="50" height="10"><img src="images/productinfo/product_info_smallline.gif" width="50" height="10"><img src="images/productinfo/product_info_smallline.gif" width="50" height="10"><img src="images/productinfo/product_info_smallline.gif" width="50" height="10"><img src="images/productinfo/product_info_smallline.gif" width="50" height="10"><img src="images/productinfo/product_info_smallline.gif" width="50" height="10"></div></td>

         </tr>

         <tr> 

           <td colspan="2" class="main"> <p><?php echo stripslashes($product_info_values['products_description']); ?></p>

             <?php

if (CONFIGURATION_USE_MO_PICS=='true') {

?>

           </td>

         </tr>

         <tr> 

           <td colspan="2"> <table width="100%">

               <?php

   if ($product_info_values['products_subimage1'] != '') {

?>

               <br>

               <tr width=100%> 

                 <td align="center" class="smallText"> <script language="javascript"><!--

document.write('<?php echo '<a href="javascript:popupWindow('' . tep_href_link(FILENAME_POPUP_IMAGE1, 'pID=' . $product_info_values['products_id']) . '')">' . tep_image(DIR_WS_IMAGES . $product_info_values['products_subimage1'], addslashes($product_info_values['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');

//--></script> <noscript>

                   <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info_values['products_subimage1']) . '">' . tep_image(DIR_WS_IMAGES . $product_info_values['products_subimage1'], $product_info_values['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?> 

                   </noscript> </td>

                 <?php

   }

?>

                 <?php

   if ($product_info_values['products_subimage2'] != '') {

?>

                 <td align="center" class="smallText"> <script language="javascript"><!--

document.write('<?php echo '<a href="javascript:popupWindow('' . tep_href_link(FILENAME_POPUP_IMAGE2, 'pID=' . $product_info_values['products_id']) . '')">' . tep_image(DIR_WS_IMAGES . $product_info_values['products_subimage2'], addslashes($product_info_values['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');

//--></script> <noscript>

                   <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info_values['products_subimage2']) . '">' . tep_image(DIR_WS_IMAGES . $product_info_values['products_subimage2'], $product_info_values['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?> 

                   </noscript> </td>

                 <?php

   }

?>

                 <?php

   if ($product_info_values['products_subimage3'] != '') {

?>

                 <td align="center" class="smallText"> <script language="javascript"><!--

document.write('<?php echo '<a href="javascript:popupWindow('' . tep_href_link(FILENAME_POPUP_IMAGE3, 'pID=' . $product_info_values['products_id']) . '')">' . tep_image(DIR_WS_IMAGES . $product_info_values['products_subimage3'], addslashes($product_info_values['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');

//--></script> <noscript>

                   <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info_values['products_subimage3']) . '">' . tep_image(DIR_WS_IMAGES . $product_info_values['products_subimage3'], $product_info_values['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?> 

                   </noscript> </td>

               </tr>

               <?php

   }

?>

               <?php

   if ($product_info_values['products_subimage4'] != '') {

?>

               <tr width="100%"> 

                 <td align="center" class="smallText"> <script language="javascript"><!--

document.write('<?php echo '<a href="javascript:popupWindow('' . tep_href_link(FILENAME_POPUP_IMAGE4, 'pID=' . $product_info_values['products_id']) . '')">' . tep_image(DIR_WS_IMAGES . $product_info_values['products_subimage4'], addslashes($product_info_values['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');

//--></script> <noscript>

                   <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info_values['products_subimage4']) . '">' . tep_image(DIR_WS_IMAGES . $product_info_values['products_subimage4'], $product_info_values['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?> 

                   </noscript> </td>

                 <?php

   }

?>

                 <?php

   if ($product_info_values['products_subimage5'] != '') {

?>

                 <td align="center" class="smallText"> <script language="javascript"><!--

document.write('<?php echo '<a href="javascript:popupWindow('' . tep_href_link(FILENAME_POPUP_IMAGE5, 'pID=' . $product_info_values['products_id']) . '')">' . tep_image(DIR_WS_IMAGES . $product_info_values['products_subimage5'], addslashes($product_info_values['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');

//--></script> <noscript>

                   <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info_values['products_subimage5']) . '">' . tep_image(DIR_WS_IMAGES . $product_info_values['products_subimage5'], $product_info_values['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?> 

                   </noscript> </td>

                 <?php

   }

?>

                 <?php

   if ($product_info_values['products_subimage6'] != '') {

?>

                 <td align="center" class="smallText"> <script language="javascript"><!--

document.write('<?php echo '<a href="javascript:popupWindow('' . tep_href_link(FILENAME_POPUP_IMAGE6, 'pID=' . $product_info_values['products_id']) . '')">' . tep_image(DIR_WS_IMAGES . $product_info_values['products_subimage6'], addslashes($product_info_values['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');

//--></script> <noscript>

                   <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info_values['products_subimage6']) . '">' . tep_image(DIR_WS_IMAGES . $product_info_values['products_subimage6'], $product_info_values['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?> 

                   </noscript> </td>

               </tr>

               <?php

   }

?>

             </table>

             <table width="400" border="0" cellpadding="0" cellspacing="0">

               <tr> 

                 <td align="left" valign="top" class="main"> <img src="images/productinfo/product_info_additional_options_lower_top.gif" width="400" height="20"></td>

               </tr>

               <tr> 

                 <td align="left" background="images/productinfo/product_info_particulars_bottom.gif" class="main"><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">

                     <tr> 

                       <td class="main">You may consider these related products 

                         or accessories. Check the boxes, then add the items 

                         to your cart automatically by clicking the "Add 

                         to Cart" button. </td>

                     </tr>

                   </table></td>

               </tr>

               <tr> 

                 <td align="left" background="images/productinfo/product_info_particulars_bg.gif" class="main"> 

                   <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">

                     <tr> 

                       <td class="main"> 

                         <?php

}

   if ($products_attributes == '1') {

     $products_options_name = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . $HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . $languages_id . "'");

     echo '<b>' . TEXT_PRODUCT_OPTIONS . '</b><br>';

     echo '<table border="0" cellpadding="0" cellspacing"0">';

     while ($products_options_name_values = tep_db_fetch_array($products_options_name)) { 

       $selected = 0;

       $products_options_array = array();

       echo '<tr><td class="main">' . $products_options_name_values['products_options_name'] . ':</td><td>' . "n"; 

       $products_options = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . $products_options_name_values['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . $languages_id . "'");

       while ($products_options_values = tep_db_fetch_array($products_options)) {

         $products_options_array[] = array('id' => $products_options_values['products_options_values_id'], 'text' => $products_options_values['products_options_values_name']);

         if ($products_options_values['options_values_price'] != '0') {

           $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options_values['price_prefix'] . $currencies->display_price($products_options_values['options_values_price'], tep_get_tax_rate($product_info_values['products_tax_class_id'])) .') ';

         }

       }

       echo tep_draw_pull_down_menu('id[' . $products_options_name_values['products_options_id'] . ']', $products_options_array, $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name_values['products_options_id']]);

       echo '</td></tr>';

     }

     echo '</table>';

   }

?>

                       </td>

                     </tr>

                   </table></td>

               </tr>

               <tr> 

                 <td align="left" class="main"><img src="images/productinfo/product_info_particulars_bottom.gif" width="400" height="15"></td>

               </tr>

             </table>

             <br>

           </td>

         </tr>

         <?php

//// Begin Reviews on Product Information page hack

if (MAX_REVIEWS_IN_PRODUCT_INFO <= 0) {

//// End Reviews on Product Information page hack

   $reviews = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . $HTTP_GET_VARS['products_id'] . "'");

   $reviews_values = tep_db_fetch_array($reviews);

   if ($reviews_values['count'] > 0) {

?>

         <tr> 

           <td colspan="2" class="main"><br> <?php echo TEXT_CURRENT_REVIEWS . ' ' . $reviews_values['count']; ?></td>

         </tr>

         <?php

   }

//// Begin Reviews on Product Information page hack

}

//// End Reviews on Product Information page hack

   if ($product_info_values['products_url']) {

?>

         <tr> 

           <td colspan="2" class="main"><br> <?php echo sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info_values['products_url']), 'NONSSL', true, false)); ?></td>

         </tr>

         <?php

   }



   if ($product_info_values['products_date_available'] > date('Y-m-d H:i:s')) {

?>

         <tr> 

           <td colspan="2" align="center" class="smallText"><br> </td>

         </tr>

         <?php

   } else {

?>

         <tr> 

           <td colspan="2" align="center" class="smallText"><br> <?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info_values['products_date_added'])); ?></td>

         </tr>

         <?php

   }

?>

         <tr> 

           <td colspan="2"><br> <table border="0" width="100%" cellspacing="0" cellpadding="0">

               <tr> 

                 <td class="main"><a href="<?php echo tep_href_link(FILENAME_PRODUCT_REVIEWS, substr(tep_get_all_get_params(), 0, -1)); ?>"><?php echo tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS); ?></a></td>

               <tr> 

                 <td><br> <table border="0" width="100%" cellspacing="0" cellpadding="0">

                     <tr> 

                       <td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, substr(tep_get_all_get_params(), 0, -1)) . '">' . tep_image_button('button_write_review.gif', IMAGE_BUTTON_WRITE_REVIEW) . '</a>'; ?></td>

                       <td align="right" class="main"><input type="hidden" name="products_id" value="<?php echo $product_info_values['products_id']; ?>"> 

                         <?php echo tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td>

                     </tr>

                   </table></td>

               </tr>

               <?php

 $reviews_query = tep_db_query("select r.reviews_id, rd.reviews_text, r.reviews_rating, r.date_added, r.customers_name from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd where r.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and rd.reviews_id = r.reviews_id and rd.languages_id = '" . $languages_id . "' order by r.reviews_id DESC");

 $num_rows = tep_db_num_rows($reviews_query);



 if ($num_rows > 0) {

   $row = 0;

   while (($reviews_values = tep_db_fetch_array($reviews_query)) && ($row < MAX_REVIEWS_IN_PRODUCT_INFO)) {

     $row++;

     $date_added = tep_date_short($reviews_values['date_added']);

?>

               <tr> 

                 <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

               </tr>

               <tr> 

                 <td valign="top" class="main"><?php echo sprintf(tep_image(DIR_WS_IMAGES . 'stars_' . $reviews_values['reviews_rating'] . '.gif', sprintf(BOX_REVIEWS_TEXT_OF_5_STARS, $reviews_values['reviews_rating']))) . ' – <i>' . $reviews_values['customers_name'] . ', ' . $date_added . '</i><br>' . htmlspecialchars($reviews_values['reviews_text']) ?></td>

               </tr>

               <?php

   }

?>

               <tr> 

                 <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

               </tr>

               <tr> 

                 <td class="smallText"><?php echo sprintf(TEXT_DISPLAY_NUMBER_OF_REVIEWS, '1', $row, $num_rows); ?></td>

               </tr>

               <?php

   if ($num_rows > MAX_REVIEWS_IN_PRODUCT_INFO) {

?>

               <tr> 

                 <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

               </tr>

               <tr> 

                 <td><a href="<?php echo tep_href_link(FILENAME_PRODUCT_REVIEWS, substr(tep_get_all_get_params(), 0, -1)); ?>"><?php echo tep_image_button('button_more_reviews.gif', IMAGE_BUTTON_MORE_REVIEWS); ?></a></td>

               </tr>

               <?php

   }

 } else {

?>

               <tr> 

                 <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

               </tr>

               <tr> 

                 <td class="smallText"><?php echo TEXT_NO_REVIEWS; ?></td>

               </tr>

               <tr> 

                 <td><br> <table border="0" width="100%" cellspacing="0" cellpadding="0">

                     <tr> 

                       <td class="main"> </td>

                       <td align="right" class="main"> </td>

                     </tr>

                   </table></td>

               </tr>

               <?php

}



//// End Reviews on Product Information page hack

?>

               <?php

$submit_button = tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART);

?>

               <td align="right" class="main">  </td>

               </tr>

             </table></td>

         </tr>

         <tr> 

           <td colspan="2"><br> 

             <?php

   if ( (USE_CACHE == 'true') && !SID) {

     echo tep_cache_also_purchased(3600);

   } else {

     include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);

   }

?>

           </td>

         </tr>

       </table>

     </form></td>

<!-- body_text_eof //-->

 </tr>

</table>

<!-- body_eof //-->



<!-- footer //-->

<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>

<!-- footer_eof //-->

<br>

</body>

</html>

<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

Any help people?

 

Please tell me it's a bug with me not with the system :-)

Link to comment
Share on other sites

please do not post the entire contents of a module... it is not necessary - all you need to do is post a code snippet from the area where the error is occuring... thank you

 

 

if the error is showing up on a line that does not exist in your code, the first thing to check for is blank spaces following and

 

?>

 

as this will cause parse errors

Link to comment
Share on other sites

Thanks for your reply Jeff.

 

Yes I have added the Reviews in product description module. However I dont believe that this is causing the problem. I do believe it has to do with the product attributes area.

 

What I did (before it got crazy on me) is put a table with images around it. The only way it can work is by an old file which has 2 x Product Attributes appearing on the page. So I am leaning towards this.

I removed 1 occurance of this php code and this has happened. I am unsure why this should occur since there is still one occurance of the attributes php code on the page anyway...

 

*weird*

Link to comment
Share on other sites

give me a minute to look at it - I dont use that mod, and the error is indicating a problem with a global variable ($), but that doesnt mean that is what the problem really is - there is a syntax error buried in there somewhere.....

Link to comment
Share on other sites

dreamweaver shouldnt be a problem (I use the mac version), but you have to watch out because dreamweaver loves to add blank lines at the end of code, and with php this will generate errors

 

if you are on a mac, do you have bbedit? if you are on a pc, forget the question.... :lol:

Link to comment
Share on other sites

in dreamweaver, open the file and use the 'apple source formatting' under the commands menu (I assume its in the same place) - then check and see if there are any blank lines following the last ?>

 

if so, strip them out so the code ends with the cursor right after the last ?>

 

see if that fixes it

Link to comment
Share on other sites

Jeff, thanks for the tip, unfortunately same problem... this time...

 

Parse error: parse error, unexpected $ in /usr/local/psa/home/vhosts/mygeekshop.com/httpdocs/store/catalog/product_info.php on line 468

 

This is a very weird error...

Link to comment
Share on other sites

Hi Doug,

 

Are you sure its in the same directory? We have the another shop which is live (mygeekshop.com) and the site I am refering to is the main site.

 

So you may be thinking of the live rather than the development site.

Link to comment
Share on other sites

you may need to start over with that mod/contribution - this is what I show in that code range:

 

434 //// Begin Reviews on Product Information page hack

435 if (MAX_REVIEWS_IN_PRODUCT_INFO <= 0) {

436 //// End Reviews on Product Information page hack

437 ? ? $reviews = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . $HTTP_GET_VARS['products_id'] . "'");

438 ? ? $reviews_values = tep_db_fetch_array($reviews);

439 ? ? if ($reviews_values['count'] > 0) {

440 ?>

441 ? ? ? ? ?

442 <tr> ? ? ? ? ? ?

443 <td colspan="2" class="main"><br>

444 <?php echo TEXT_CURRENT_REVIEWS . ' ' . $reviews_values['count']; ?></td>

445 ? ? ? ? ? </tr>

446 ? ? ? ? ?

447 <?php

448 ? ? }

449 //// Begin Reviews on Product Information page hack

450 }

451 //// End Reviews on Product Information page hack

452 ? ? if ($product_info_values['products_url']) {

453 ?>

454 ? ? ? ? ?

455 <tr> ? ? ? ? ? ?

456 <td colspan="2" class="main"><br>

457 <?php echo sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info_values['products_url']), 'NONSSL', true, false)); ?></td>

458 ? ? ? ? ? </tr>

459 ? ? ? ? ?

460 <?php

461 ? ? }

462

463 ? ? if ($product_info_values['products_date_available'] > date('Y-m-d H:i:s')) {

464 ?>

465 ? ? ? ? ?

466 <tr> ? ? ? ? ? ?

467 <td colspan="2" align="center" class="smallText"><br>

468 </td>

Link to comment
Share on other sites

on the statement

if (!tep_db_num_rows($product_info)) {

you cut out the closing } on the else part (that shows the prod info)...

 

change

<?php 

   if ( (USE_CACHE == 'true') && !SID) { 

     echo tep_cache_also_purchased(3600); 

   } else { 

     include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS); 

   }

?>

to

<?php 

   if ( (USE_CACHE == 'true') && !SID) { 

     echo tep_cache_also_purchased(3600); 

   } else { 

     include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS); 

   }

 }

?>

The only thing necessary for evil to flourish is for good men to do nothing

- Edmund Burke

Link to comment
Share on other sites

Thank you so much! Works and rocking now... now to edit more of the cart!

 

Always thankful I have a place to turn to on these boards!

Link to comment
Share on other sites

Sorry I can't help with your error

 

dudes its already been fixed... look at the last 2 replies made before you posted.

The only thing necessary for evil to flourish is for good men to do nothing

- Edmund Burke

Link to comment
Share on other sites

I know sorry, I did not see that the post was already on 2 pages until after I posted it, I thought I was replying to the last post on page one. Once you hit that submit button then it's gone and you can't take it back :)

Best wishes

Steve

Link to comment
Share on other sites

yeah gotta watch out for these multi-page thread since there are only 10 replies per page shown

The only thing necessary for evil to flourish is for good men to do nothing

- Edmund Burke

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...