Zuncan Posted July 14, 2005 Share Posted July 14, 2005 Hi! Im struggeling with configurating my product_info.php. I've run into a problem that I was hoping that someone here could solve. I installed the contribution that lets me display the avarege review rating on the product info page. Problem is that its to low on the page and I want to move more to the top of the page. But when I do that the whole look of my website crashes! Can someone se whats wrong with this code? Do I need to ad something or can someone rewrite this code to make it work? <TABLE BORDER="0" WIDTH="100%" CELLSPACING="0" CELLPADDING="0"> <TR> <TD WIDTH="261"> <?php echo $products_name; ?> </TD> <?php $reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'"); $reviews = tep_db_fetch_array($reviews_query); $reviews_query_average = tep_db_query("select (avg(reviews_rating)) as average_rating from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and approved = 1"); $reviews_average = tep_db_fetch_array($reviews_query_average); $reveiws_stars = $reviews_average['average_rating']; $reveiws_rating = number_format($reveiws_stars,0); if ($reviews['count'] > 0) { ?> <TD WIDTH="*" CLASS="main"> <?php echo TEXT_REVIEW_AVERAGE . ' ' . '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image(DIR_WS_IMAGES . 'stars_' . $reveiws_rating . '.gif') . ' <BR> ' . ' Baserat p? ' . $reviews['count'] . ' st ' . TEXT_CURRENT_REVIEWS . ''. '</a>'; ?> </TD> <TD WIDTH="200"> <php echo $products_price; ?></B> </TD> </TR> </TABLE> More than greatful for help / Zuncan So what?! Who care in a hundred years anyway? Link to comment Share on other sites More sharing options...
Zuncan Posted July 14, 2005 Author Share Posted July 14, 2005 If you need the whole file to help me out, Im on MSN Messenger. So what?! Who care in a hundred years anyway? Link to comment Share on other sites More sharing options...
Zuncan Posted July 14, 2005 Author Share Posted July 14, 2005 Solved it! I had to end it with a: <?php } ?> So what?! Who care in a hundred years anyway? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.