Zen Cart Logo
Forums / Bug Reports / [Done v1.3.9b] 1.3.9a Random Reviews Running Rampant

[Done v1.3.9b] 1.3.9a Random Reviews Running Rampant

Locked

Views: 3,456

Results 1 to 20 of 20
This thread is locked. New replies are disabled.
21 Apr 2010, 1:50 AM
#1
toniscraparoni avatar

toniscraparoni

Zen Follower

Join Date:
Apr 2009
Posts:
158
Plugin Contributions:
0

[Done v1.3.9b] 1.3.9a Random Reviews Running Rampant

How's that for alliteration? ;)

Prior to upgrade, I had 1.3.8a. The Reviews sidebox was in play and behaving perfectly. It was set to display one review at a time, and to rotate up to 100 reviews.

Post upgrade, it seems every review ever written is being shown in the box, untruncated. The only thing not appearing is the customer's name who wrote it. I didn't check to see if that's a new change. In any case, I'd like it to behave again, as far as how many reviews should be showing. My index page is quite long now, to say the least! ;)

I can't seem to find where it's instructed to display one review in the box. So I toggled the max value rotation setting instead. To no avail. I've also checked reviews.php and tpl_reviews_random, but I don't see anything glaring that jumps out at me, except possibly MAX_RANDOM_SELECT_REVIEWS in reviews.php (line 31) needs to be defined somewhere. I tried to reduce the "60" in tpl_random_reviews to fix the truncation, but that didn't seem to make a difference. I also removed what looked like an extra dash right after the 60 and before the next <br> (line 16). That didn't make a difference either.

Out of ideas. TIA for any help! :)

21 Apr 2010, 2:19 AM
#2
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: [Done v1.3.9b] 1.3.9a Random Reviews Running Rampant

Not familiar with the module in question but it would seem that, if re-reading the Install instructions that come with the module does not solve the problem then it might be to remove it or at least disable it for the time being. It is known that not all modules work properly in 1.3.9 and only trial & error will tell which ones do... or don't.

21 Apr 2010, 2:22 AM
#3
toniscraparoni avatar

toniscraparoni

Zen Follower

Join Date:
Apr 2009
Posts:
158
Plugin Contributions:
0

Re: [Done v1.3.9b] 1.3.9a Random Reviews Running Rampant

Thanks, Rob, but it isn't a mod.

21 Apr 2010, 8:18 PM
#4
mshultise avatar

mshultise

Zen Follower

Join Date:
Feb 2005
Location:
Captain Cook, Hawaii
Posts:
172
Plugin Contributions:
0

Re: [Done v1.3.9b] 1.3.9a Random Reviews Running Rampant

ToniScraparoni:

Thanks, Rob, but it isn't a mod.

My reviews sidebox showed all reviews (and all text , I believe) down the page. Sounds similar to what you saw. I disabled it until I can investigate, but having other issues at the moment.

I don't remember if I used a 3rd party or the builtin reviews.

21 Apr 2010, 9:40 PM
#5
petleyj avatar

petleyj

Zen Follower

Join Date:
Jul 2009
Location:
Norwich, UK
Posts:
122
Plugin Contributions:
0

Re: [Done v1.3.9b] 1.3.9a Random Reviews Running Rampant

Just to let you know , I am also having this issue.

22 Apr 2010, 12:39 AM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: [Done v1.3.9b] 1.3.9a Random Reviews Running Rampant

Check the settings in the Configuration ... Maximum Values ...

Random Product Reviews for SideBox
Number of random product REVIEWS to rotate in the sidebox
Enter the number of products to display in this sidebox at one time.

How many products do you want to display in this sidebox?

How many are you set to display?

22 Apr 2010, 7:53 AM
#7
mshultise avatar

mshultise

Zen Follower

Join Date:
Feb 2005
Location:
Captain Cook, Hawaii
Posts:
172
Plugin Contributions:
0

Re: [Done v1.3.9b] 1.3.9a Random Reviews Running Rampant

In my case, 10.

22 Apr 2010, 3:00 PM
#8
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: [Done v1.3.9b] 1.3.9a Random Reviews Running Rampant

10 will show 10 reviews ... if you only want to see 1 set that to 1 ...

22 Apr 2010, 6:43 PM
#9
mshultise avatar

mshultise

Zen Follower

Join Date:
Feb 2005
Location:
Captain Cook, Hawaii
Posts:
172
Plugin Contributions:
0

Re: [Done v1.3.9b] 1.3.9a Random Reviews Running Rampant

Ajeh:

10 will show 10 reviews ... if you only want to see 1 set that to 1 ...

I have changed Random Product Reviews for Sidebox (Max) and Random New Product Reviews for Sidebox (Max) both to 1. The problem persists. Also, all of the text shows for the review, instead of the few lines of text which displayed before. I think it used to be limited to 60 characters, which was 3 or 4 lines of sidebox.

It may have moved or combined elsewhere with the rewrite of the file, but in the old reviews code, there was this:


$review_box_text_query = "select substring(reviews_text, 1, 60) as reviews_text
                 from " . TABLE_REVIEWS_DESCRIPTION . "

which I assume limited the text in the box to 60 characters and not the whole review.

I will disable reviews until I can play more, as it is not critical for me to have this at present.

As an aside, I still have .htaccess issues, which I do not think is causing this.

22 Apr 2010, 10:13 PM
#10
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: [Done v1.3.9b] 1.3.9a Random Reviews Running Rampant

Did you forget to upgrade your tpl_reviews_random.php template?

23 Apr 2010, 1:05 AM
#11
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: [Done v1.3.9b] 1.3.9a Random Reviews Running Rampant

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

23 Apr 2010, 1:09 AM
#12
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: [Done v1.3.9b] 1.3.9a Random Reviews Running Rampant

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_breakstring(nl2br(zen_output_string_protected(stripslashes($random_review_sidebox_product->fields['reviews_text']))), 60**, '-<br />') . ' ..**</a><br /><br />'
and replace with this:
zentrunc_string(nl2br(zen_output_string_protected(stripslashes($random_review_sidebox_product->fields['reviews_text']))), 60) . '</a><br /><br />'

23 Apr 2010, 7:23 PM
#13
toniscraparoni avatar

toniscraparoni

Zen Follower

Join Date:
Apr 2009
Posts:
158
Plugin Contributions:
0

Re: [Done v1.3.9b] 1.3.9a Random Reviews Running Rampant

DrByte:

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_sidebox_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_sidebox_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. ;)

23 Apr 2010, 7:43 PM
#14
toniscraparoni avatar

toniscraparoni

Zen Follower

Join Date:
Apr 2009
Posts:
158
Plugin Contributions:
0

Re: [Done v1.3.9b] 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! :)

23 Apr 2010, 7:55 PM
#15
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: [Done v1.3.9b] 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.

23 Apr 2010, 8:08 PM
#16
toniscraparoni avatar

toniscraparoni

Zen Follower

Join Date:
Apr 2009
Posts:
158
Plugin Contributions:
0

Re: [Done v1.3.9b] 1.3.9a Random Reviews Running Rampant

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

23 Apr 2010, 8:10 PM
#17
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: [Done v1.3.9b] 1.3.9a Random Reviews Running Rampant

Fine.
Replace the whole line with this then:

    $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']));
23 Apr 2010, 8:30 PM
#18
toniscraparoni avatar

toniscraparoni

Zen Follower

Join Date:
Apr 2009
Posts:
158
Plugin Contributions:
0

Re: [Done v1.3.9b] 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!

23 Apr 2010, 8:57 PM
#19
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: [Done v1.3.9b] 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.

23 Apr 2010, 9:29 PM
#20
toniscraparoni avatar

toniscraparoni

Zen Follower

Join Date:
Apr 2009
Posts:
158
Plugin Contributions:
0

Re: [Done v1.3.9b] 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! :)