Results 1 to 7 of 7
  1. #1
    Join Date
    Oct 2007
    Location
    MA, USA
    Posts
    385
    Plugin Contributions
    0

    Default Can we display Product reviews on the product page without clicking "Read Reviews"?

    Can we display Product reviews on the product page without clicking "Read Reviews"?

    Thanks
    Thank you, Sincerely, MagicMan

  2. #2
    Join Date
    Jul 2013
    Posts
    57
    Plugin Contributions
    0

    Default Re: Can we display Product reviews on the product page without clicking "Read Reviews

    I'm looking for this as well. I used to use this plugin, called dgReviews:
    http://www.zen-cart.com/downloads.php?do=file&id=116

    However, it is not updated to work with v1.5 and I can verify that it does not work.

  3. #3
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    1,731
    Plugin Contributions
    27

    Default Re: Can we display Product reviews on the product page without clicking "Read Reviews

    Have a peek at canada computers dot com, they are displaying the reviews in the product information tabs...
    Twitch.
    https://www.twitchtoo.com Do you work for free? Please donate.
    Twitch Base8 - Obsidian - This, is what's new.

  4. #4
    Join Date
    Dec 2007
    Location
    Payson, AZ
    Posts
    1,076
    Plugin Contributions
    15

    Default Re: Can we display Product reviews on the product page without clicking "Read Reviews

    Quote Originally Posted by MagicMan View Post
    Can we display Product reviews on the product page without clicking "Read Reviews"?
    Why yes you can.. the heard part is deciding on layout.

    I use a modified version of the Average Product Rating mod, then setup code to display the reviews in a expanding dropdown tab. the link will take to one of my products that has a review.

    Lantern

    the code side is really simple, add database query to the page variables, add code to the template to display the query... this is what's on my page so you may have to weed out what you don't need...


    includes/modules/pages\product_info/main_template_vars.php
    Code:
    // if review must be approved or disabled do not show review 
        $review_status = " and r.status = '1'"; 
     
        $reviews_query = "select count(*) as count 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; 
     
        $reviews = $db->Execute($reviews_query); 
     
        // 2P added BOF - Average Product Rating 
        $reviews_average_rating_query = "select avg(reviews_rating) as average_rating 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; 
     
        $reviews_average_rating = $db->Execute($reviews_average_rating_query); 
         
    $reviews_query_raw = "select * 
                          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; 
     
    $reviews_split = new splitPageResults($reviews_query_raw, 10); 
        // 2P added EOF - Average Product Rating
    then on the product page I used this to dispaly it inside a expanding tab
    includes/template/YOURTEMPLATE/templates/tpl_product_info_display.php
    Code:
    <div class="content1"> 
    <?php 
      if ($reviews_split->number_of_rows > 0) { 
    ?> 
    <div id="reviewsDefaultListingTopNumber" class="navSplitPagesResult"><?php echo $reviews_split->display_count(TEXT_DISPLAY_NUMBER_OF_REVIEWS); ?></div> 
     
    <div id="reviewsDefaultListingTopLinks" 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 
        $reviews = $db->Execute($reviews_split->sql_query); 
        while (!$reviews->EOF) { 
    ?> 
    <hr /> 
    <div class="bold"><?php echo sprintf(TEXT_REVIEW_BY, zen_output_string_protected($reviews->fields['customers_name'])); ?></div> 
    <div class="content"> 
    <?php echo sprintf(TEXT_REVIEW_DATE_ADDED, zen_date_short($reviews->fields['date_added'])); ?><br /> 
    <?php echo zen_output_string_protected(stripslashes($reviews->fields['reviews_text'])); ?></div>  
    <div class="rating"><?php echo zen_image(DIR_WS_TEMPLATE_IMAGES . '/rat_' . $reviews->fields['reviews_rating'] . '.gif', sprintf(TEXT_OF_5_STARS, $reviews->fields['reviews_rating'])), sprintf(TEXT_OF_5_STARS, $reviews->fields['reviews_rating']); ?></div> 
    <?php 
          $reviews->MoveNext(); 
        } 
    ?> 
    <?php 
      } else { 
    ?> 
    <div id="reviewsDefaultNoReviews" class="content"><?php echo TEXT_NO_REVIEWS; ?></div> 
    <?php 
      } 
    ?> 
    <span class="forward"><?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>'; ?></span> 
    </div>
    Dave
    Always forward thinking... Lost my mind!

  5. #5
    Join Date
    Oct 2007
    Location
    MA, USA
    Posts
    385
    Plugin Contributions
    0

    Default Re: Can we display Product reviews on the product page without clicking "Read Reviews

    Quote Originally Posted by twitchtoo View Post
    Have a peek at canada computers dot com, they are displaying the reviews in the product information tabs...
    Yeah well I did have a look and each time I clicked on a product info my Antivirus came up to warn me that the page contained Malware. That is just great. Thanks.

  6. #6
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    1,731
    Plugin Contributions
    27

    Default Re: Can we display Product reviews on the product page without clicking "Read Reviews

    Quote Originally Posted by MagicMan View Post
    Yeah well I did have a look and each time I clicked on a product info my Antivirus came up to warn me that the page contained Malware. That is just great. Thanks.
    There's no malware there mate, it's a legit site and retail store.
    Twitch.
    https://www.twitchtoo.com Do you work for free? Please donate.
    Twitch Base8 - Obsidian - This, is what's new.

  7. #7
    Join Date
    Oct 2007
    Location
    MA, USA
    Posts
    385
    Plugin Contributions
    0

    Default Re: Can we display Product reviews on the product page without clicking "Read Reviews

    Quote Originally Posted by twitchtoo View Post
    There's no malware there mate, it's a legit site and retail store.
    It is a nice site and does not look like it is intentional, but there is definatly something going on that you should look into. This is what I get from Avast Antivirus when I click on the product page. Maybe this would help.


    avast!Web Shield has blocked a harmful webpage or file.

    Object: "https://www.dsply.com"

    Infection: URL:Mal

    Process: C:\Program Files (x86)\...\firefox.exe
    Last edited by MagicMan; 31 Mar 2014 at 03:08 PM.
    Thank you, Sincerely, MagicMan

 

 

Similar Threads

  1. How to restrict "Read Reviews" to logged in users?
    By awhfy99 in forum General Questions
    Replies: 2
    Last Post: 28 Feb 2013, 07:13 PM
  2. Replies: 2
    Last Post: 22 Aug 2011, 09:20 PM
  3. Product reviews CAN'T be read on my site?
    By joemind in forum General Questions
    Replies: 0
    Last Post: 27 Sep 2009, 08:45 PM
  4. 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