Thread: Reviews Area

Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2009
    Posts
    617
    Plugin Contributions
    0

    Default Reviews Area

    I have been messing with this all day and just can not seem to get it

    The code that controls what I'm trying to do is this:
    PHP Code:
    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_REVIEWSzen_get_all_get_params()) . '">' Read_all_reviews '</a>'?></div><!--. zen_image_button(BUTTON_IMAGE_REVIEWS, BUTTON_REVIEWS_ALT) .-->
    <!--<br class="clearBoth" />-->

    <?php //bof added code per 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'] * 20) / 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>';
           
    ?><!--eof added code per Average Product Rating-->
    <?php } else { ?>
    <div id="productReviewLink" class="buttonRow back"><?php echo '<a href="' zen_href_link(FILENAME_PRODUCT_REVIEWS_WRITEzen_get_all_get_params(array())) . '">' Write_a_review '</a>'?></div><!--zen_image_button(BUTTON_IMAGE_WRITE_REVIEW, BUTTON_WRITE_REVIEW_ALT)-->
    I am trying to move the 'Customer review' above the 'Read all reviews' link and then add a 'Write a Reviews' link next to 'Read all reviews'.

    It would be great if a fresh pair of eyes can look at it for me and show me what I've been doing wrong.
    Thank you,
    autoace

  2. #2
    Join Date
    Jun 2009
    Posts
    617
    Plugin Contributions
    0

    Default Re: Reviews Area

    Also in addition to that,

    I've installed dgReviews (places the reviews of the product on the product info page) and it works fine. The only minor thing I would like to add to it is to make the 'Read all reviews' link at the top of the page (in code above) an anchor link to the 'Heading' area I made for the reviews at the bottom of the page. Does anyone know how to do that?

    So basically when a customer clicks on the 'Read all reviews' link, they will simply be taken to the bottom of the page where the reviews are *INSTEAD* of being taken to another page (which is how the 'Read all reviews' link currently works).

    Thanks very much.
    Thank you,
    autoace

 

 

Similar Threads

  1. Replies: 4
    Last Post: 24 Oct 2015, 05:54 AM
  2. Replies: 2
    Last Post: 22 Aug 2011, 09:20 PM
  3. Reviews - uploading pre-written reviews?
    By towerhealth in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 10 Nov 2010, 12:32 PM
  4. Reviews Sidebox - How to add reviews?
    By SpiceGlow in forum Basic Configuration
    Replies: 5
    Last Post: 24 Oct 2009, 05:12 PM
  5. Adding "write reviews" form and reviews to product info display
    By papa smurf in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 31 Dec 2007, 09:13 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR