Thread: Reviews Display

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

    Default Reviews Display

    Does anyone know how to display the reviews on the actual product info page? I have Tabbed Products Pro installed and working but I would like to show the reviews below the tabbed the section of the page.
    Thank you,
    autoace

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

    Default Re: Reviews Display

    There's this - I haven't used it.

    http://www.zen-cart.com/index.php?ma...roducts_id=213

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

    Default Re: Reviews Display

    Quote Originally Posted by stevesh View Post
    Thanks for the link. I'm going to download it and check it out, I'm a bit cautious about it because it is old and was built for 1.3.6., but still worth a look.
    Thank you,
    autoace

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,977
    Plugin Contributions
    96

    Default Re: Reviews Display

    If you're already using Tabbed Products Pro, a slight modification of /includes/modules/tabbed_products_pro.php might do the trick for you.

    Assuming that you've disabled the Reviews tab, search in that file for this code block:

    Code:
    			//Pre-load Reviews
                if ($bReviews_Tab != false) {
        			$fmtRVW .= "\n" . '<div style="width:100%;">' . "\n";
        			$old_products_name = $products_name;
        			ob_start();
        			require(DIR_WS_LANGUAGES . $_SESSION['language'] . '/reviews.php'); 
        			require(DIR_WS_MODULES . '/pages/product_reviews/header_php.php');
        			require($template->get_template_dir('tpl_product_reviews_default.php', DIR_WS_TEMPLATE, $current_page_base,'templates'). '/' . 'tpl_product_reviews_default.php');
        			// Hack the output a bit to remove the copy of the main image that reviews normally has on it and other duplicate stuff
        			$products_name = $old_products_name;
        			$fmtRVW .= ob_get_contents();
        			ob_end_clean();
        			$fmtRVW = str_replace('id="productMainImage"', 'id="productMainImageReview" style="display:none;"', $fmtRVW);
                    $fmtRVW = str_replace('id="productReviewsDefaultProductImage"', 'id="productReviewsDefaultProductImage" style="display:none;"', $fmtRVW);
        			$fmtRVW = str_replace('class="forward buttonWrapper"', 'class="forward buttonWrapper" style="display:none;"', $fmtRVW);
        			$fmtRVW = str_replace('class="buttonRow"', 'class="buttonRow" style="display:none;"', $fmtRVW);
        			//$fmtRVW = str_replace('class="buttonRow forward"', 'class="buttonRow forward" style="display:none;"', $fmtRVW);
                    // don't hide read reviews button causes write reviews to float drop off tab. To fix, adding float to .tabcontent and width 100%. Lets see how it works.
        			$fmtRVW = str_replace('id="productReviewsDefaultHeading"', 'id="productReviewsDefaultHeading" style="display:none;"', $fmtRVW);
        			$fmtRVW = str_replace('id="productReviewsDefaultPrice"', 'id="productReviewsDefaultPrice" style="display:none;"', $fmtRVW);
        			$fmtRVW = str_replace('span class="normalprice"', 'span class="normalprice" style="display:none;"', $fmtRVW);
        			$fmtRVW = str_replace('span class="productSalePrice"', 'span class="productSalePrice" style="display:none;"', $fmtRVW);
        			$fmtRVW = str_replace('span class="productPriceDiscount"', 'span class="productPriceDiscount" style="display:none;"', $fmtRVW);
        			$fmtRVW .= "\n" . '</div>'. "\n";
    			}
    If you remove the conditional around the creation of the $fmtRVW variable, you'd be able to imbed that content whereever you want within your /includes/templates/CUSTOM/templates/tpl_product_info_display.php file.

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

    Default Re: Reviews Display

    Quote Originally Posted by lat9 View Post
    If you're already using Tabbed Products Pro, a slight modification of /includes/modules/tabbed_products_pro.php might do the trick for you.

    Assuming that you've disabled the Reviews tab, search in that file for this code block:

    Code:
    			//Pre-load Reviews
                if ($bReviews_Tab != false) {
        			$fmtRVW .= "\n" . '<div style="width:100%;">' . "\n";
        			$old_products_name = $products_name;
        			ob_start();
        			require(DIR_WS_LANGUAGES . $_SESSION['language'] . '/reviews.php'); 
        			require(DIR_WS_MODULES . '/pages/product_reviews/header_php.php');
        			require($template->get_template_dir('tpl_product_reviews_default.php', DIR_WS_TEMPLATE, $current_page_base,'templates'). '/' . 'tpl_product_reviews_default.php');
        			// Hack the output a bit to remove the copy of the main image that reviews normally has on it and other duplicate stuff
        			$products_name = $old_products_name;
        			$fmtRVW .= ob_get_contents();
        			ob_end_clean();
        			$fmtRVW = str_replace('id="productMainImage"', 'id="productMainImageReview" style="display:none;"', $fmtRVW);
                    $fmtRVW = str_replace('id="productReviewsDefaultProductImage"', 'id="productReviewsDefaultProductImage" style="display:none;"', $fmtRVW);
        			$fmtRVW = str_replace('class="forward buttonWrapper"', 'class="forward buttonWrapper" style="display:none;"', $fmtRVW);
        			$fmtRVW = str_replace('class="buttonRow"', 'class="buttonRow" style="display:none;"', $fmtRVW);
        			//$fmtRVW = str_replace('class="buttonRow forward"', 'class="buttonRow forward" style="display:none;"', $fmtRVW);
                    // don't hide read reviews button causes write reviews to float drop off tab. To fix, adding float to .tabcontent and width 100%. Lets see how it works.
        			$fmtRVW = str_replace('id="productReviewsDefaultHeading"', 'id="productReviewsDefaultHeading" style="display:none;"', $fmtRVW);
        			$fmtRVW = str_replace('id="productReviewsDefaultPrice"', 'id="productReviewsDefaultPrice" style="display:none;"', $fmtRVW);
        			$fmtRVW = str_replace('span class="normalprice"', 'span class="normalprice" style="display:none;"', $fmtRVW);
        			$fmtRVW = str_replace('span class="productSalePrice"', 'span class="productSalePrice" style="display:none;"', $fmtRVW);
        			$fmtRVW = str_replace('span class="productPriceDiscount"', 'span class="productPriceDiscount" style="display:none;"', $fmtRVW);
        			$fmtRVW .= "\n" . '</div>'. "\n";
    			}
    If you remove the conditional around the creation of the $fmtRVW variable, you'd be able to imbed that content whereever you want within your /includes/templates/CUSTOM/templates/tpl_product_info_display.php file.
    Thanks for the info. The link that stevesh provided actually worked quite well and very easy to implement!
    Thank you,
    autoace

 

 

Similar Threads

  1. Replies: 6
    Last Post: 31 Mar 2014, 03:06 PM
  2. Reviews to display like Amazon?
    By RobWUK in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 2 Aug 2010, 04:04 PM
  3. 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

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