♥stubbsy Posted February 17, 2006 Posted February 17, 2006 I'm not sure what I've done as i'm in the middle of a major update and have changed most files, but when you click on a review to read it it is messed up only showing 1 character. www.myfirstchopper.com/reviews.php any ideas how to resolve this? Cheers stubbsy
♥stubbsy Posted February 17, 2006 Author Posted February 17, 2006 umm thats weird, seems that the cause was moving the review box to the right hand column, I've put it back in the left column and now it works ok, wtf?!?!
241 Posted February 17, 2006 Posted February 17, 2006 To fix the issue with the box being moved to the left column by replacing the instances of $review with $reviews ORIGINAL $review_query = tep_db_query("select substring(reviews_text, 1, 60) as reviews_text from " . TABLE_REVIEWS_DESCRIPTION . " where reviews_id = '" . (int)$random_product['reviews_id'] . "' and languages_id = '" . (int)$languages_id . "'"); $review = tep_db_fetch_array($review_query); $review = tep_break_string(tep_output_string_protected($review['reviews_text']), 15, '-<br>'); $info_box_contents[] = array('text' => '<div align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $random_product['products_id'] . '&reviews_id=' . $random_product['reviews_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></div><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $random_product['products_id'] . '&reviews_id=' . $random_product['reviews_id']) . '">' . $review . ' ..</a><br><div align="center">' . tep_image(DIR_WS_IMAGES . 'stars_' . $random_product['reviews_rating'] . '.gif' , sprintf(BOX_REVIEWS_TEXT_OF_5_STARS, $random_product['reviews_rating'])) . '</div>'); FIXED $reviews_query = tep_db_query("select substring(reviews_text, 1, 60) as reviews_text from " . TABLE_REVIEWS_DESCRIPTION . " where reviews_id = '" . (int)$random_product['reviews_id'] . "' and languages_id = '" . (int)$languages_id . "'"); $reviews = tep_db_fetch_array($reviews_query); $reviews = tep_break_string(tep_output_string_protected($reviews['reviews_text']), 15, '-<br>'); $info_box_contents[] = array('text' => '<div align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $random_product['products_id'] . '&reviews_id=' . $random_product['reviews_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></div><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $random_product['products_id'] . '&reviews_id=' . $random_product['reviews_id']) . '">' . $reviews . ' ..</a><br><div align="center">' . tep_image(DIR_WS_IMAGES . 'stars_' . $random_product['reviews_rating'] . '.gif' , sprintf(BOX_REVIEWS_TEXT_OF_5_STARS, $random_product['reviews_rating'])) . '</div>'); or you can download the latest revision of the osCommerce package and replace the reviews file which uses rand_review instead of the above fix of reviews No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes.
♥stubbsy Posted February 19, 2006 Author Posted February 19, 2006 Thanks for the reply Steve, will give that go :) cheers stubbsy
Recommended Posts
Archived
This topic is now archived and is closed to further replies.