Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18
  1. #11
    Join Date
    Apr 2009
    Posts
    155
    Plugin Contributions
    1

    Default Re: 1.3.9a Random Reviews Running Rampant

    Quote Originally Posted by DrByte View Post
    Tony, can you specify which version you upgraded from?
    I'm puzzled as to why it would be showing 100 reviews if you have only specified 1 as the maximum. I can't recreate that problem in 1.3.9
    1.3.8a, as indicated in my original post. ;)


    The issue of the "text" on product reviews showing the entire review can be quickly fixed by making this small change to the tpl_reviews_random.php template file:

    Find this:
    zen_break_string(nl2br(zen_output_string_protected(stripslashes($random_review_s idebox_pr oduct->fields['reviews_text']))), 60, '-<br />') . ' ..</a><br /><br />')
    and replace with this:
    zen_trunc_string(nl2br(zen_output_string_protected(stripslashes($random_review_s idebox_pr oduct->fields['reviews_text']))), 60)
    Not that easily, apparently. Hehe!

    PHP Parse error: syntax error, unexpected T_STRING in /sideboxes/tpl_reviews_random.php on line 16

    Thanks very much for the help. Glad to see I'm not alone. ;)

  2. #12
    Join Date
    Apr 2009
    Posts
    155
    Plugin Contributions
    1

    Default Re: 1.3.9a Random Reviews Running Rampant

    Updating to say I put Random Reviews back to 1, which displays only one review in the box as it should. The reviews seem to rotate when I refresh the page. Yay!

    However, in 1.3.8a, it seems like there was an additional setting; one for the number to display at one time, another for how many to rotate. I remember changing that when I received a complaint the same reviews were always showing. Assuming then, 1.3.9a will automatically rotate among every review.

    So, if we can fix the trunc issue, I/we all should be good to go. Thank you! :)

  3. #13
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: 1.3.9a Random Reviews Running Rampant

    Oops ... sorry ... I left off a tiny bit, which I've corrected in my earlier post:

    . '</a><br /><br />')

    The corrections are just the parts highlighted.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  4. #14
    Join Date
    Apr 2009
    Posts
    155
    Plugin Contributions
    1

    Default Re: 1.3.9a Random Reviews Running Rampant

    Thanks, Dr. Byte. Still not working for me, though.

  5. #15
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: 1.3.9a Random Reviews Running Rampant

    Fine.
    Replace the whole line with this then:

    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_trunc_string(nl2br(zen_output_string_protected(stripslashes($random_review_sidebox_product->fields['reviews_text']))), 60) . '</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']));
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  6. #16
    Join Date
    Apr 2009
    Posts
    155
    Plugin Contributions
    1

    Default Re: 1.3.9a Random Reviews Running Rampant

    Now THAT worked! TYVM!!

    But you aren't getting rid of me just yet, I'm afraid. Hehe! I just noticed another related issue. I have a custom sidebox below the reviews sidebox. The header in the box below is now mirroring the reviews sidebox header. It wasn't a linking image before. Now it links to reviews and has the [more] link underneath.

    Haven't touched that box since putting it in almost a year ago. Checked the templates, all look normal. Any ideas?

    Thank you again for all of your help!

  7. #17
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: 1.3.9a Random Reviews Running Rampant

    That suggests that your custom sidebox isn't properly resetting the variables before execution. Compare its /includes/modules/sideboxes/ file with other built-in sideboxes to see what you've missed.

    That's not a bug with ZC core files. If you have specific problems with it, please start another thread for it outside of the Bug Reports area.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  8. #18
    Join Date
    Apr 2009
    Posts
    155
    Plugin Contributions
    1

    Default Re: 1.3.9a Random Reviews Running Rampant

    Great suggestion, Dr. B. I dunno why it changed behavior after the upgrade, but adding in $title_link = false; fixed it.

    Thank you again for all of your help! :)

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. [Done v1.3.9] new products listing not random
    By fakeDecoy in forum Bug Reports
    Replies: 27
    Last Post: 4 Jan 2011, 04:57 PM
  2. [DONE v1.3.9] Display Random Reviews
    By cscuilla in forum Bug Reports
    Replies: 5
    Last Post: 30 Jul 2009, 02:41 PM
  3. [Done] Random Reviews?
    By NFM in forum Bug Reports
    Replies: 5
    Last Post: 3 Aug 2008, 04:51 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