I am trying to install DGReviews. It is a rather old one but worked until 1.3.9h
I know the language file behaves and the problem I am having is this one with it appearing on the page correctly. I add the code it says to add to the tpl_product_info.php but no matter where I add it I get the results in the image below....the reviews show with the write a review button but the footer shies away from where it needs to be.
It--the footer also after removing all review codes has a space between it and the bottom of page.
Could it be the actual dgreviews.php that messes it up or what am I doing wrong.
Code:
<?php
// dgReviews v 1.01
//Modified to work with version v1.3.6 of the dgcart
// This is a quick down and dirty mod to add product reviews onto the product info page
// by MichaelDuvall.com
?>
<!-- bof: dgReviews-->
<div>
<?php
//change this constant to change the title for the customer reviews
$review_title = 'Customer Reviews';
$review_status = " and r.status = '1'";
/* This is where you change the parameter value to output 1000 charaters or equivelent */
$reviews_query_raw = "select r.reviews_id, left(rd.reviews_text, 1000) as reviews_text,
r.reviews_rating, r.date_added, r.customers_name
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 . "
order by r.reviews_id desc";
$reviews_split = new splitPageResults($reviews_query_raw, MAX_DISPLAY_NEW_REVIEWS);
if ($reviews_split->number_of_rows > 0) {
if ((PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3')) {
?>
<?php
if ($reviews->fields['count'] > 0) {
echo '<div align="left">';
echo DG_CUSTOMER_REVIEWS_TITLE;
echo '</div>';
echo '<div align="left">';
echo '<hr>';
echo '</div>';
}
?>
<div><?php echo $reviews_split->display_count(TEXT_DISPLAY_NUMBER_OF_REVIEWS); ?></div>
<br/>
<div align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $reviews_split->display_links(MAX_DISPLAY_PAGE_LINKS, zen_get_all_get_params(array('page', 'info', 'main_page'))); ?></div>
<?php
}
$reviews = $db->Execute($reviews_split->sql_query);
while (!$reviews->EOF) {
?>
<?php // change the class name here to reflect your CSS page ?>
<div class="bold"><?php echo sprintf(TEXT_REVIEW_BY, zen_output_string_protected($reviews->fields['customers_name'])); ?></div>
<div align="left"><?php echo sprintf(TEXT_REVIEW_DATE_ADDED, zen_date_short($reviews->fields['date_added'])); ?></div>
<div align="left">
<?php echo zen_break_string(zen_output_string_protected(stripslashes($reviews->fields['reviews_text'])), 35, '-<br />').'<br /><br />'. sprintf(TEXT_REVIEW_RATING, zen_image(DIR_WS_TEMPLATE_IMAGES . 'stars_' . $reviews->fields['reviews_rating'] . '.gif', sprintf(TEXT_OF_5_STARS, $reviews->fields['reviews_rating'])), sprintf(TEXT_OF_5_STARS, $reviews->fields['reviews_rating'])); ?>
</div>
<div><hr></div>
<?php
$reviews->MoveNext();
}
?>
<?php
} else {
?>
<br/>
<?php
}
if (($reviews_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3'))) {
?>
<div><?php echo $reviews_split->display_count(TEXT_DISPLAY_NUMBER_OF_REVIEWS); ?></div>
<br/>
<div align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $reviews_split->display_links(MAX_DISPLAY_PAGE_LINKS, zen_get_all_get_params(array('page', 'info', 'main_page'))); ?></div>
<br/>
<?php
}
?>
<!-- eof: also_purchased -->
<?php //this is the end of dgReview?>
Screen-shot-2015-07-14-at-9.32.51-PM.jpg
Screen-shot-2015-07-14-at-9.32.30-PM.jpg
Bookmarks