Results 1 to 4 of 4

Hybrid View

  1. #1
    Join Date
    Jun 2012
    Posts
    68
    Plugin Contributions
    2

    Default How to display review number even only 1 review?

    Greetings-

    When there are more than 1 product reviews, the text "Displaying 1 to % (of % reviews)" will show at the bottom of review section. But if there is only 1 review, the text won't show up. (When no review, the text "There are currently no product reviews" will be there.)

    How to show the text when there is only one review?

    I think the file 'tpl_product_reviews_default.php' need to customized, but I don't know how. URL:
    (more than 1 review) http://www.angelcorp.cn/index.php?ma...products_id=92
    (only 1 review) http://www.angelcorp.cn/index.php?ma...products_id=93
    (no review) http://www.angelcorp.cn/index.php?ma...products_id=94

    Thank you.

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: How to display review number even only 1 review?

    I may not understand your question, but the default Zencart behavior seems to make the most sense to me. Why do you want to tell your visitors that there is only one review when they can see that for themselves on the page?

  3. #3
    Join Date
    Jun 2012
    Posts
    68
    Plugin Contributions
    2

    Default Re: How to display review number even only 1 review?

    It looks better in that way. Otherwise it's blank in that place. Better appearance is also a goal when building website. Thanks.

  4. #4
    Join Date
    Jun 2012
    Posts
    68
    Plugin Contributions
    2

    Default Re: How to display review number even only 1 review?

    Figured out. Edit file '/includes/templates/YOUR_TEMPLATE/templates/tpl_product_reviews_default.php'
    Change ($reviews_split->number_of_rows > 0) into ($reviews_split->number_of_rows > 1) and add an 'elseif ($reviews_split->number_of_rows > 0)...' clause.

    <?php
    }

    if (($reviews_split->number_of_rows > 1) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3'))) {
    ?>
    <hr />
    <div id="productReviewsDefaultListingBottomNumber" class="navSplitPagesResult"><?php echo $reviews_split->display_count(TEXT_DISPLAY_NUMBER_OF_REVIEWS); ?></div>
    <div id="productReviewsDefaultListingBottomLinks" class="navSplitPagesLinks"><?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
    }
    elseif (($reviews_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3'))) {
    ?>
    <hr />
    <span id="productReviewsDefaultListingBottomNumber" class="navSplitPagesResult"><?php echo ' YOUR_OWN_TEXT ' ; ?> </span>

    <?php
    }
    ?>

 

 

Similar Threads

  1. Dgreviews mod support required read review should = write review
    By limelites in forum All Other Contributions/Addons
    Replies: 7
    Last Post: 13 Aug 2013, 06:34 PM
  2. how to make customers only can write a review on the products he or she bought?
    By win8win in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 2 Jul 2012, 01:22 PM
  3. How to Change the Review Display Order?
    By naturalintegrators in forum Customization from the Admin
    Replies: 2
    Last Post: 13 Mar 2010, 08:09 PM
  4. How to hide sidebox "review" when you open page "Review"
    By vadimzven in forum Basic Configuration
    Replies: 10
    Last Post: 24 Sep 2009, 05:52 PM

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