Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Code Matters / 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
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

Post #1 by toniscraparoni

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! :)

If you want something done right, you have to get Zenned.
♥-My Zen Cart Mods-♥

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

Post #2 by website_rob

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.

The learning is in the doing.

Potent Products

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

toniscraparoni

Zen Follower

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

Post #3 by toniscraparoni

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

If you want something done right, you have to get Zenned.
♥-My Zen Cart Mods-♥

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

Post #4 by mshultise

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.

Aloha from Hawaii! (its a dirty job, but SOMEBODY has to live here...)

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

petleyj

Zen Follower

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

Post #5 by petleyj

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

FMUK Consulting - Web Design & Development | Graphics | Marketing | Apps - http://www.FMUKConsulting.co.uk

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

ajeh

Oba-san

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

Post #6 by ajeh

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?

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!]
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!

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

Post #7 by mshultise

In my case, 10.

Aloha from Hawaii! (its a dirty job, but SOMEBODY has to live here...)

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

ajeh

Oba-san

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

Post #8 by ajeh

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

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!]
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!

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

Post #9 by mshultise

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.

Aloha from Hawaii! (its a dirty job, but SOMEBODY has to live here...)

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

drbyte

Sensei

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

Post #10 by drbyte

Did you forget to upgrade your tpl_reviews_random.php template?

.
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.

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

drbyte

Sensei

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

Post #11 by 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

.
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.

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

drbyte

Sensei

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

Post #12 by drbyte

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 />'

.
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.

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

toniscraparoni

Zen Follower

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

Post #13 by toniscraparoni

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

If you want something done right, you have to get Zenned.
♥-My Zen Cart Mods-♥

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

toniscraparoni

Zen Follower

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

Post #14 by toniscraparoni

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! :)

If you want something done right, you have to get Zenned.
♥-My Zen Cart Mods-♥

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

drbyte

Sensei

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

Post #15 by drbyte

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.

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

toniscraparoni

Zen Follower

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

Post #16 by toniscraparoni

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

If you want something done right, you have to get Zenned.
♥-My Zen Cart Mods-♥

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

drbyte

Sensei

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

Post #17 by drbyte

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']));

.
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.

23 Apr 2010, 8:30 PM
#18
toniscraparoni avatar

toniscraparoni

Zen Follower

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

Post #18 by toniscraparoni

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!

If you want something done right, you have to get Zenned.
♥-My Zen Cart Mods-♥

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

drbyte

Sensei

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

Post #19 by drbyte

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.

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

toniscraparoni

Zen Follower

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

Post #20 by toniscraparoni

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! :)

If you want something done right, you have to get Zenned.
♥-My Zen Cart Mods-♥