Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 35
  1. #11
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: reviews sidebox!? main page problem

    Try using this as the:
    /includes/templates/your_template_dir/sideboxes/tpl_reviews_random.php

    Code:
    <?php
    /**
     * Side Box Template
     *
     * @package templateSystem
     * @copyright Copyright 2003-2009 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: tpl_reviews_random.php 14007 2009-07-30 14:35:22Z ajeh $
     */
      $content = "";
      $review_box_counter = 0;
      while (!$random_review_sidebox_product->EOF) {
        $review_box_counter++;
        $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent centeredContent">';
        $content .= '<a href="' . zen_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $random_review_sidebox_product->fields['products_id'] . '&reviews_id=' . $random_review_sidebox_product->fields['reviews_id']) . '">' . zen_image(DIR_WS_IMAGES . $random_review_sidebox_product->fields['products_image'], $random_review_sidebox_product->fields['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '<br />' . zen_break_string(nl2br(zen_output_string_protected(stripslashes($random_review_sidebox_product->fields['reviews_text']))), 60, '-<br />') . ' ..</a><br /><br />' . zen_image(DIR_WS_TEMPLATE_IMAGES . 'stars_' . $random_review_sidebox_product->fields['reviews_rating'] . '.gif' , sprintf(BOX_REVIEWS_TEXT_OF_5_STARS, $random_review_sidebox_product->fields['reviews_rating']));
        $content .= '</div>';
        $random_review_sidebox_product->MoveNextRandom();
      }
    ?>
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  2. #12
    Join Date
    Jun 2006
    Posts
    566
    Plugin Contributions
    0

    Default Re: reviews sidebox!? main page problem

    that's kinda cool that code adds the reviewers content text in the side box, which is nicer then then just having the product name but can you cut down the content to 30 characters, as it looks like it displays the whole review in the sidebox

    again thanks again linda
    Last edited by MB1; 22 Feb 2010 at 05:41 AM.
    www.gorillagear.ca = zencart v1.3.9h with 40+ mods

  3. #13
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: reviews sidebox!? main page problem

    Change the 60 to what you want ...

    If you need the name in there, you could add it between the image and the description by referencing it like it is on the alt tag of the image:
    $random_review_sidebox_product->fields['products_name']
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  4. #14
    Join Date
    Jun 2006
    Posts
    566
    Plugin Contributions
    0

    Default Re: reviews sidebox!? main page problem

    yeah i was hoping that was it but nothing happens until i get it don to about 8 then then it start screwing around with the width of the content in the side box but the full review is still displayed just over more rows

    right now i changed the 60 to a 10 with no real change
    www.gorillagear.ca = zencart v1.3.9h with 40+ mods

  5. #15
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: reviews sidebox!? main page problem

    Put the 60 back and add a substr around the text ... for example:
    Code:
    substr($random_review_sidebox_product->fields['reviews_text'], 0, 20)
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  6. #16
    Join Date
    Jun 2006
    Posts
    566
    Plugin Contributions
    0

    Default Re: reviews sidebox!? main page problem

    worked perfectly thank you again
    www.gorillagear.ca = zencart v1.3.9h with 40+ mods

  7. #17
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: reviews sidebox!? main page problem

    You are most welcome ... thanks for the update!
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  8. #18
    Join Date
    Jun 2006
    Posts
    566
    Plugin Contributions
    0

    Default Re: reviews sidebox!? main page problem

    ohh if you want feedback i tried to adjust how much text could be displayed in the side box with this part of the code
    Code:
    , 0, 20)
    but it didn't really work but no worries i am a happy camper now
    www.gorillagear.ca = zencart v1.3.9h with 40+ mods

  9. #19
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: reviews sidebox!? main page problem

    I used:
    Code:
        $content .= '<a href="' . zen_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $random_review_sidebox_product->fields['products_id'] . '&reviews_id=' . $random_review_sidebox_product->fields['reviews_id']) . '">' . zen_image(DIR_WS_IMAGES . $random_review_sidebox_product->fields['products_image'], $random_review_sidebox_product->fields['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '<br />' . zen_break_string(nl2br(zen_output_string_protected(stripslashes(substr($random_review_sidebox_product->fields['reviews_text'], 0, 20)))), 60, '-<br />') . ' ..</a><br /><br />' . zen_image(DIR_WS_TEMPLATE_IMAGES . 'stars_' . $random_review_sidebox_product->fields['reviews_rating'] . '.gif' , sprintf(BOX_REVIEWS_TEXT_OF_5_STARS, $random_review_sidebox_product->fields['reviews_rating']));
    Meanwhile, glad you have it working now ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  10. #20
    Join Date
    Feb 2010
    Posts
    71
    Plugin Contributions
    0

    Default Re: reviews sidebox!? main page problem

    Quote Originally Posted by Ajeh View Post
    You are most welcome ... thanks for the update!

    Great mod it worked for me too. However having made the mod I now have two strange problems and I am not sure if it is related to the mod.

    my site is www.fastbikegear.co.nz and I am using the ZJ black template.

    The first problem is that my manufacturer's info side box now has the same contents as my new products info side box?

    The second problem is that the order that my side boxes appears in does not match that set in my Layout Box Controller?

    Is anyone able to shed any light on what I have done wrong and what I need to do to fix this?

    Many thanks in advance

 

 
Page 2 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. v151 New reviews on main page
    By perfumbg in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 15 Jul 2013, 08:44 AM
  2. v138a Customer reviews for main page
    By perfumbg in forum General Questions
    Replies: 0
    Last Post: 14 Sep 2012, 04:55 PM
  3. v150 Main page reviews
    By wyewyewye in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 18 Aug 2012, 12:16 PM
  4. Remove product reviews on main page only
    By robbinsgj in forum Templates, Stylesheets, Page Layout
    Replies: 16
    Last Post: 21 Jun 2010, 06:39 AM
  5. Removing Image from Main page Reviews box
    By Dsewell2 in forum Basic Configuration
    Replies: 0
    Last Post: 18 Mar 2009, 04:37 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