Hey,
I am pretty sure this must be a built in feature but I cannot get it to work.
I would like a preview of the first 5 reviews on the poduct page instead of having to click reviews to read them.
How do I get this to work?
Cheers
Daniel!
Hey,
I am pretty sure this must be a built in feature but I cannot get it to work.
I would like a preview of the first 5 reviews on the poduct page instead of having to click reviews to read them.
How do I get this to work?
Cheers
Daniel!
You might be able to adapt this add on ...
http://www.zen-cart.com/index.php?ma...roducts_id=213
I have not looked at it and it sounds like it shows reviews for the Product on the Product pages ... but if you want "any" 5 reviews, you could probably adapt this or get an idea of what things might need to be done ...
It is older code, but often times that is not an issue ...
Let us know how this works for you ...
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
I got it working!
Thanks for your advice.
For anyone interested I place the code below into the tpl_product_info_display.php
PHP Code:<!--bof Reviews button and count-->
<?php
if ($flag_show_product_info_reviews == 1) {
// if more than 0 reviews, then show reviews button; otherwise, show the "write review" button
if ($reviews->fields['count'] > 0 ) { ?>
<?php
foreach ($reviewsArray as $reviews) {
?>
<div class="ReviewBy"><?php echo sprintf(TEXT_REVIEW_BY, zen_output_string_protected($reviews['customersName'])); ?><?php echo zen_image(DIR_WS_TEMPLATE_IMAGES . 'stars_' . $reviews['reviewsRating'] . '.gif'); ?></div><br>
<div class="productReviewsDefaultProductMainContent content"><?php echo zen_break_string(zen_output_string_protected(stripslashes($reviews['reviewsText'])), 60, '-<br />') . ((strlen($reviews['reviewsText']) >= 100) ? '...' : ''); ?></div><br>
<br class="clearBoth" />
<?php
}
?>
</div>
<br class="clearBoth" />
<div id="productReviewLink" class="buttonRow back"><?php echo '<a href="' . zen_href_link(FILENAME_PRODUCT_REVIEWS, zen_get_all_get_params()) . '">' . zen_image_button(BUTTON_IMAGE_REVIEWS, BUTTON_REVIEWS_ALT) . '</a>'; ?></div>
<?php } else { ?>
<div id="productReviewLink" class="buttonRow back" style="clear:both"><?php echo '<a href="' . zen_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, zen_get_all_get_params(array())) . '">' . zen_image_button(BUTTON_IMAGE_WRITE_REVIEW, BUTTON_WRITE_REVIEW_ALT) . '</a>'; ?></div>
<br class="clearBoth" />
<?php
}
}
?>
<!--eof Reviews button and count -->
Thanks for the update and for posting the solution that worked for you on putting the Reviews on the product _info page ...![]()
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!