Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / Customer Reviews, their full name is diplayed?

Customer Reviews, their full name is diplayed?

Views: 21,075

Results 1 to 20 of 43
21 Apr 2009, 3:41 AM
#1
monty_python avatar

monty_python

New Zenner

Join Date:
Aug 2008
Location:
LA
Posts:
36
Plugin Contributions:
0

Customer Reviews, their full name is diplayed?

Sorry, wasn't sure where to ask this, I do know I control product reviews through through the Product Type Link though.

When a customer leaves a review, the review shows their entire full name (on their account anyway). This seems non appetizing to leave reviews due to lack of privacy. Is there a way for a customer to only have his/her first name in the review (or even anonymous or a new name of their choice).

Thanks for readin!
-Monty

26 Apr 2009, 12:11 AM
#2
monty_python avatar

monty_python

New Zenner

Join Date:
Aug 2008
Location:
LA
Posts:
36
Plugin Contributions:
0

Re: Customer Reviews, their full name is diplayed?

Hello, if someone can help me manipulate a little code, I'd be very grateful! As explained, I don't want my customers full name to be displayed for Product Reviews. I found this page on another thread
"includes/modules/pages/product_reviews_write/header_php.php"

It seem that here I can somehow customize reviews, though it looks like a foreign language to me. I assume that when someone submits a review it uses their 'customer_id' as the author of the review (all assumptions here).

Can I manipulate this to say anything else, like...

  1. Registered User
  2. MD Customer (MD is my store)
  3. Just their first name (this is what i really want)
  4. Somehow a extra name 'they' provide when they fill out the review form

...or any other options I'm not thinking of that simply allow customers to review products without revealing their entire name would be great!

I'm still trying to solve this on my own, I'm slowly getting better at finding my own Zen Cart answers.

Thanks for reading!
_monty

26 Apr 2009, 12:54 AM
#5
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,799
Plugin Contributions:
15

Re: Customer Reviews, their full name is diplayed?

You can use the Developers Tool Kit to search for the files using customers_firstname and edit them to fit your needs.

26 Apr 2009, 1:10 AM
#6
steven300 avatar

steven300

Totally Zenned

Join Date:
Jan 2008
Posts:
1,564
Plugin Contributions:
1

Re: Customer Reviews, their full name is diplayed?

After thinking about it some more, customers who are logged in would still have their full name displayed. I actually combined it with this change which takes care of the logged-in customers as well, by only showing their first name and not their last:
http://www.zen-cart.com/forum/showthread.php?t=84346

Note that it only works for reviews made after the change and not before.

I'm not familiar with the mod you linked to but it sounds like it might be what you're after.

26 Apr 2009, 1:25 AM
#7
monty_python avatar

monty_python

New Zenner

Join Date:
Aug 2008
Location:
LA
Posts:
36
Plugin Contributions:
0

Re: Customer Reviews, their full name is diplayed?

Thanks for posting guys! I'm not sure what I want to do in the long run yet, I've run into some options now which is great, thanks so much for helping!!!!

One thing I did myself to accomplish one of my short term goals...

goto "includes/modules/pages/product_reviews_write/header_php.php"

Open that page and goto line 80
Delete "customers_lastname".

At this point only customer first names show up in the reviews which is good enough for me to allow them and encourage them, I'm still not sure what I want for my final solution though.

Does anyone think this edit I made will mess anything else up? I'm assuming not and will report back and issues.

One thing to keep in mind if you're reading this thread, Steven is right, you can't change a user's name on already submitted reviews, you can only delete the review entirely. So you may want to commit to a good solution before allowing reviews since there is no turning back once they're submitted... first name is good enough for me.

Thanks again for your attention!!!

26 Apr 2009, 2:44 AM
#8
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,799
Plugin Contributions:
15

Re: Customer Reviews, their full name is diplayed?

Well... You could write a mysql script to truncate the existing customers_name field in the reviews table. The name is in "first last" format.

25 May 2009, 7:50 PM
#9
bluefirefly avatar

bluefirefly

New Zenner

Join Date:
Aug 2008
Posts:
44
Plugin Contributions:
0

Re: Customer Reviews, their full name is diplayed?

You can change a reviewers name after the fact by going into your database. I did this for a customer by going to my phpMyAdmin, found the zen_reviews table and manually edited my customers name for them. :smile:,

20 Jun 2009, 1:49 PM
#10
madmumbler avatar

madmumbler

Zen Follower

Join Date:
Dec 2005
Location:
SWFL
Posts:
450
Plugin Contributions:
0

Re: Customer Reviews, their full name is diplayed?

You can also go copy the tpl_product_reviews_default.php and tpl_product_reviews_info_default.php files from the default template, put them in your custom template, and edit them so it doesn't display the user name when it renders. I just tried this on a site I'm developing, and so far, it seems to work fine. You can always edit the language files to tell the customers that their name won't be displayed in the posted review.

HTH,
Lesli.

2 Jul 2009, 5:54 AM
#11
godling avatar

godling

New Zenner

Join Date:
Jun 2009
Posts:
6
Plugin Contributions:
0

Re: Customer Reviews, their full name is diplayed?

Lesli,

Any chance you feel like elaborating?

20 Nov 2009, 3:57 PM
#12
richuno avatar

richuno

New Zenner

Join Date:
Nov 2009
Posts:
4
Plugin Contributions:
0

Re: Customer Reviews, their full name is diplayed?

My solution was to split the reviewer's name into first and last name, then truncate the last name to the first letter.

copy template_default/templates/tpl_product_reviews_info_default.php to YOUR_TEMPLATE/templates/

then replace:

<div id="reviewsInfoDefaultMainContent" class="content"><?php echo zen_break_string(nl2br(zen_output_string_protected(stripslashes($review_info->fields['reviews_text']))), 60, '-<br />'); ?></div> <div id="reviewsInfoDefaultDate" class="bold"><?php echo sprintf(TEXT_REVIEW_DATE_ADDED, zen_date_short($review_info->fields['date_added'])); ?> <?php echo sprintf(TEXT_REVIEW_BY, zen_output_string_protected($review_info->fields['customers_name'])); ?></div>

with:

<div id="reviewsInfoDefaultMainContent" class="content"><?php echo zen_break_string(nl2br(zen_output_string_protected(stripslashes($review_info->fields['reviews_text']))), 60, '-<br />'); ?></div> <div id="reviewsInfoDefaultDate" class="bold"><?php echo sprintf(TEXT_REVIEW_DATE_ADDED, zen_date_short($review_info->fields['date_added'])); ?> <?php list($review_first_name, $review_last_name) = split(' ', zen_output_string_protected($review_info->fields['customers_name'])); $last_name_array = str_split($review_last_name,1); echo sprintf(TEXT_REVIEW_BY, $review_first_name).' '.$last_name_array[0].'.'; ?></div>

[I selected the entire div to make the section easier to find]

it changes the review information from "by John Smith" to "by John S."

Hope it helps

14 Jan 2010, 8:08 AM
#13
miguel_t avatar

miguel_t

New Zenner

Join Date:
Jan 2010
Location:
Tucson, AZ, USA
Posts:
2
Plugin Contributions:
0

Re: Customer Reviews, their full name is diplayed?

I have successfully been able to remove the first and last name, but how do I remove the word "by". For example, once customers post a review it now reads:

Date Added: 01/14/2010 by

Where do I remove the "by" word? Any help would be appreciated. Thank you,

Miguel

11 Apr 2010, 11:17 AM
#14
strelizia avatar

strelizia

New Zenner

Join Date:
Mar 2010
Posts:
8
Plugin Contributions:
0

Re: Customer Reviews, their full name is diplayed?

Thanks Richuno, worked like a charm! :hug:

21 Apr 2010, 7:14 PM
#15
tonibarcelona avatar

tonibarcelona

Inactive

Join Date:
Feb 2007
Location:
Barcelona
Posts:
200
Plugin Contributions:
0

Re: Customer Reviews, their full name is diplayed?

I tweked "lightly" the richuno´s code for showing first letter of the two lastnames for languages like spanish, with FIRSTNAME LASTNAME LASTNAME:

 
<div id="reviewsInfoDefaultDate" class="bold"><?php echo sprintf(TEXT_REVIEW_DATE_ADDED, zen_date_short($review_info->fields['date_added'])); ?> <?php 
list($review_first_name, $review_last_name1, $review_last_name2) = split(' ', zen_output_string_protected($review_info->fields['customers_name']));
$last_name_array1 = str_split($review_last_name1,1);
$last_name_array2 = str_split($review_last_name2,1);
echo sprintf(TEXT_REVIEW_BY, $review_first_name).' '.$last_name_array1[0].'. '.$last_name_array2[0].' '; ?></div>

Hope this helps !!

15 Jul 2010, 2:37 AM
#16
paul3648 avatar

paul3648

Zen Follower

Join Date:
Mar 2007
Location:
Taiwan
Posts:
239
Plugin Contributions:
0

Re: Customer Reviews, their full name is diplayed?

The patches above all have the same problem: when the customer goes to write a review, the page has a big heading - "Written by Joe Blow"

So any customer who does not want his full name used on a review will be scared off by seeing his full name.

There's a simple solution - /includes/templates/template_default/templates/tpl_product_reviews_write_default.php

Copy this file to your template folder i.e. /includes/templates/YOUR_TEMPLATE/templates/tpl_product_reviews_write_default.php

About line 40 - change this line:

<h3 id="reviewsWriteReviewer" class=""><?php echo SUB_TITLE_FROM, zen_output_string_protected($customer->fields['customers_firstname'] . ' ' . $customer->fields['customers_lastname']); ?></h3>

to this:

<h3 id="reviewsWriteReviewer" class=""><?php echo SUB_TITLE_FROM, zen_output_string_protected($customer->fields['customers_firstname'] . ' ' . $customer->fields['customers_lastname']{0} . '.'); ?></h3>

This truncates the last name to the first initial and adds a period.

Now the write a review page shows "Written by Joe B."

When you get a new review, go into the database and change the name on the review to Joe B.

1 Oct 2010, 6:32 PM
#17
iscatech avatar

iscatech

New Zenner

Join Date:
Mar 2009
Posts:
48
Plugin Contributions:
0

Re: Customer Reviews, their full name is diplayed?

hey guys, I'm trying to implement this change. I did what richuno suggested.

It seems to have worked fine on the individual pages, such as this one:
http://www.iscatech.com/ecommerce/index.php?main_page=product_reviews_info&products_id=4&reviews_id=8

But not on these pages:
http://www.iscatech.com/ecommerce/index.php?main_page=product_info&products_id=4
http://www.iscatech.com/ecommerce/index.php?main_page=reviews

5 Oct 2010, 3:27 AM
#18
scott_c avatar

scott_c

Zen Follower

Join Date:
Dec 2009
Posts:
236
Plugin Contributions:
0

Re: Customer Reviews, their full name is diplayed?

Thanks to Richuno and Paul3648, Ive modified the code to truncate the last name on two of the reviews pages.

There's one more page you need to modify if people are looking at a whole page of reviews. This url; https://www.MYSITE.COM/index.php?main_page=reviews - is driven by this page; tpl_reviews_default.php - which is also in the includes/templates/YOUR_TEMPLATE/templates directory of the other files mentioned above.

Around line 45 change the code; <div class="bold"><?php echo sprintf(TEXT_REVIEW_DATE_ADDED, zen_date_short($reviews->fields['date_added'])); ?> <?php echo sprintf(TEXT_REVIEW_BY, zen_output_string_protected($reviews->fields['customers_name'])); ?></div>

to this;

<div class="bold"><?php echo sprintf(TEXT_REVIEW_DATE_ADDED, zen_date_short($reviews->fields['date_added'])); ?> <?php list($review_first_name, $review_last_name) = split(' ', zen_output_string_protected($reviews->fields['customers_name']));$last_name_array = str_split($review_last_name,1); echo sprintf(TEXT_REVIEW_BY, $review_first_name).' '.$last_name_array[0].'.'; ?></div>
5 Oct 2010, 3:29 AM
#19
scott_c avatar

scott_c

Zen Follower

Join Date:
Dec 2009
Posts:
236
Plugin Contributions:
0

Re: Customer Reviews, their full name is diplayed?

This will also need to be changed on the product display page itself (within the tpl_product_info_display.php). ill hunt around and post the change if I can.

5 Oct 2010, 6:51 PM
#20
iscatech avatar

iscatech

New Zenner

Join Date:
Mar 2009
Posts:
48
Plugin Contributions:
0

Re: Customer Reviews, their full name is diplayed?

Scott_C:

This will also need to be changed on the product display page itself (within the tpl_product_info_display.php). ill hunt around and post the change if I can.

Thanks Scott, I made your change and it works. I think the last place it needs a change is on the tpl_product_info_display.php like you suggested. Let us know if you find it!