In order to make this work, I have added the following to includes\modules\pages\index\header_php.php:
Code:
$reviews_query = "select count(*) as count from " . TABLE_REVIEWS . " r, "
. TABLE_REVIEWS_DESCRIPTION . " rd
where r.products_id = '" . (int)$_GET['products_id'] . "'
and r.reviews_id = rd.reviews_id
and rd.languages_id = '" . (int)$_SESSION['languages_id'] . "'" .
$review_status;
$reviews = $db->Execute($reviews_query);
and the following code to includes]modules\MY_TEMPLATE\featured_products.php:
Code:
zen_image(DIR_WS_TEMPLATE_IMAGES . 'stars_' . $reviews->fields['reviews_rating'] . '.gif' , sprintf(BOX_REVIEWS_TEXT_OF_5_STARS, $reviews->fields['reviews_rating']))
but all I get on the home page is "of 5 Stars!". I believe the problem has to do with the fact that I'm not giving a product id to the code above but I don't know where to place it. I have tried:
Code:
$featured_products->fields['reviews_rating']
and
Code:
$reviews->fields['products_id']
I imagine there is more coding involved. If anybody has any ideas...