Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Customizing the Look of Your Shop / Templates, Stylesheets, Page Layout / Changing Reviews Link and Star Rating to top of product info page

Changing Reviews Link and Star Rating to top of product info page

Locked
This thread is locked. New replies are disabled.
27 Jul 2009, 2:58 AM
#1
sfklaas avatar

sfklaas

Zen Follower

Join Date:
Mar 2008
Posts:
219
Plugin Contributions:
0

Post #1 by sfklaas

I used the "Average Product Rating" Mod & I love it! I ideally would like to move the link, the Review Count, and the Star Rating images right underneath the product price, just right of the product image. I currently edited the /product_info_display.php file and moved the code to the top. The link image is in the right spot, but the stars and count are way under the product image. (You can get a better idea if you go to the link http://www.stevekwebdesign.com/index.php?main_page=product_info&cPath=65_67&products_id=181

Also, I added images of what I would like to do in the attachments. the star_before file is the current status, and the star_after is what I would like it to look like.

Hope this is all the info that some one will need to assist me!

Here is the code for the "Review section" that I moved in the file:

<!--eof free ship icon  -->

<!--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 ) { ?>
<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>
<br class="clearBoth" />
<?php // 2P modified BOF - Average Product Rating
  echo '<p class="reviewCount">';
  if ($flag_show_product_info_reviews_count == 1) {
    echo TEXT_CURRENT_REVIEWS . ' <strong>' . $reviews->fields['count'] . '</strong><br />';
    $stars_image_suffix = str_replace('.', '_', zen_round($reviews_average_rating->fields['average_rating'] * 2, 0) / 2); // for stars_0_5.gif, stars_1.gif, stars_1_5.gif etc.
    $average_rating = zen_round($reviews_average_rating->fields['average_rating'], 2);
    echo TEXT_CURRENT_REVIEWS_RATING . ' <strong>' . $average_rating . '</strong> ' . zen_image(DIR_WS_TEMPLATE_IMAGES . 'stars_' . $stars_image_suffix . '.gif', sprintf(BOX_REVIEWS_TEXT_OF_5_STARS, $average_rating));
  } else {
    echo '';
  }
  echo '</p>';
// 2P modified EOF - Average Product Rating ?>
<?php } else { ?>
<div id="productReviewLink" class="buttonRow back"><?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 -->

 <!--bof Product description -->
27 Jul 2009, 3:13 AM
#2
sfklaas avatar

sfklaas

Zen Follower

Join Date:
Mar 2008
Posts:
219
Plugin Contributions:
0

Post #2 by sfklaas

easy fix... I just took out the first <br class="clearBoth" />