PDA

View Full Version : Customer Reviews error



niallb
04-20-2012, 02:17 AM
Hi.
New site using v2.5.1, posted a test customer review and accepted it via admin. On the 'Reviews' page it shows up fine but if I click to read the full review I get this page Arundel design brass door handles EHZB021PB [EHZB021PB] - £14.99 : Essex Handles for door handles, ironmongery & hardware, Reviews (http://www.essexhandles.co.uk/catalog/product_reviews_info.php/arundel-design-brass-door-handles-ehzb021pb-pri-3?reviews_id=1)
Im guessing this is a bug as I dont have this on sites using earlier versions.

pgmarshall
04-20-2012, 10:45 AM
Can't repeat this - have you done something to your site? I can see a V rather than a number.

Turn on error reporting and post back the Fatal Error which is displayed.

Regards.

niallb
04-20-2012, 12:54 PM
System shows no errors.
I also notice that in the Reviews page it lists this review twice Reviews : Essex Handles for door handles, ironmongery & hardware (http://www.essexhandles.co.uk/catalog/reviews.php)

markcm
09-13-2012, 10:35 AM
System shows no errors.
I also notice that in the Reviews page it lists this review twice Reviews : Essex Handles for door handles, ironmongery & hardware (http://www.essexhandles.co.uk/catalog/reviews.php)

Duplicate reviews is a documented bug, the solution is here (http://bugtrack.oscmax.com/view.php?id=1227)


fix:
in catalog/templates/fallback/reviews.tpl.php
find:


$reviews_query_raw = "select r.reviews_id, left(rd.reviews_text, 100) as reviews_text, r.reviews_rating, r.date_added, p.products_id, pd.products_name, p.products_image, r.customers_name from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c using(products_id) left join " . TABLE_CATEGORIES . " c using(categories_id) where p.products_status = '1' and p.products_id = r.products_id and r.reviews_id = rd.reviews_id and r.approved = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and rd.languages_id = '" . (int)$languages_id . "' and find_in_set('".$customer_group_id."', products_hide_from_groups) = 0 and find_in_set('" . $customer_group_id . "', categories_hide_from_groups) = 0 order by r.reviews_id DESC";
// EOF Separate Pricing Per Customer, Hide products and categories from groups
$reviews_split = new splitPageResults($reviews_query_raw, MAX_DISPLAY_NEW_REVIEWS);

a change to:


$reviews_query_raw = "select distinct r.reviews_id, left(rd.reviews_text, 100) as reviews_text, r.reviews_rating, r.date_added, p.products_id, pd.products_name, p.products_image, r.customers_name from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c using(products_id) left join " . TABLE_CATEGORIES . " c using(categories_id) where p.products_status = '1' and p.products_id = r.products_id and r.reviews_id = rd.reviews_id and r.approved = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and rd.languages_id = '" . (int)$languages_id . "' and find_in_set('".$customer_group_id."', products_hide_from_groups) = 0 and find_in_set('" . $customer_group_id . "', categories_hide_from_groups) = 0 order by r.reviews_id DESC";
// EOF Separate Pricing Per Customer, Hide products and categories from groups
$reviews_split = new splitPageResults($reviews_query_raw, MAX_DISPLAY_NEW_REVIEWS, 'p.products_id');
100% working.

pixel22
09-13-2012, 10:20 PM
In June I put on bugtracker solution 0001227: Reviews show up 2 times when product is link to another category - osCmax Bug Tracking System (http://bugtrack.oscmax.com/view.php?id=1227)