Forums / Basic Configuration / Amending names on customer reviews

Amending names on customer reviews

Locked

Started by long_tall_sally on 28 Apr 2007, 2:03 PM · Views: 3,108

Results 1 to 16 of 16
This thread is locked. New replies are disabled.
28 Apr 2007, 2:03 PM
#1
long_tall_sally avatar

long_tall_sally

New Zenner

Join Date:
Feb 2007
Posts:
7
Plugin Contributions:
0

Amending names on customer reviews

can't see this is covered anywhere - apologies if I have missed it.

I have got quite a few customer reviews - but some of my reviewers don't want their full names on the site :cool: - is there any way of just having first names as the reviewer as opposed to the full name which is generated automatically.

MTIA
Jayne

28 Apr 2007, 3:16 PM
#2
birdoasis avatar

birdoasis

Inactive

Join Date:
Jun 2005
Location:
Cheney WA
Posts:
1,123
Plugin Contributions:
0

Re: Amending names on customer reviews

There is a way, but I have to look at it to figure it out.

I'm sure that you either just have to either remove the last name field or if it's a script adding the first and last name with a space in between then the script has to be edited to just pull the first name.

It would be nice to have just the first initial and the last name. I think that looks more professional.

In the meantime you can have instructions on leaving reviews informing the customer that their full name will be shown. That way they won't leave a review if they don't want to have their name showing.

John Patrick
A Zen Cart Advocate!

28 Apr 2007, 4:35 PM
#3
long_tall_sally avatar

long_tall_sally

New Zenner

Join Date:
Feb 2007
Posts:
7
Plugin Contributions:
0

Re: Amending names on customer reviews

Thanks JP - I take the point that I need to put this on the instructions so that people know.
I have removed product reviews in the past at the request of customers who hadn't realised that their full name would be on there.

11 May 2007, 12:02 AM
#4
lauten avatar

lauten

New Zenner

Join Date:
Mar 2005
Posts:
20
Plugin Contributions:
0

Re: Amending names on customer reviews

I'm looking for a solution to this issue also. It would be great to grab the first name and first letter of last name. Or even just first and location city or state.

Brian

11 May 2007, 3:46 PM
#5
atomage avatar

atomage

New Zenner

Join Date:
Oct 2006
Posts:
15
Plugin Contributions:
0

Re: Amending names on customer reviews

I'm also very interested in doing this. If anyone knows how to do this, that would be great. My customers would actually prefer to have only their first name shown... no last name.

11 May 2007, 11:24 PM
#6
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: Amending names on customer reviews

Sounds challenging. I like. :smile:

In your includes/modules/<your_template>/pages/reviews/header_php.php file,

find:

$reviews_query_raw = "SELECT r.reviews_id, left(rd.reviews_text, 100) AS reviews_text, r.reviews_rating, r.date_added, p.products_id, pd.products_name, p.products_image, r.customers_name 
                      FROM " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd 
                      WHERE p.products_status = '1' 
                      AND p.products_id = r.products_id 
                      AND r.reviews_id = rd.reviews_id 
                      AND p.products_id = pd.products_id 
                      AND pd.language_id = :languageID 
                      AND rd.languages_id = :languageID" . $review_status . " 
                      ORDER BY r.reviews_id DESC";

replace with:

$reviews_query_raw = "SELECT r.reviews_id, left(rd.reviews_text, 100) AS reviews_text, r.reviews_rating, r.date_added, p.products_id, pd.products_name, p.products_image, c.customers_firstname
                      FROM (" . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_CUSTOMERS . " c)
                      WHERE p.products_status = '1' 
                      AND p.products_id = r.products_id 
                      AND r.reviews_id = rd.reviews_id 
                      AND p.products_id = pd.products_id 
                      AND pd.language_id = :languageID 
                      AND rd.languages_id = :languageID" . $review_status . " 
                      ORDER BY r.reviews_id DESC";

Then, in your includes/templates/<your_template>/templates/tpl_reviews_default.php file,

find this peace:

<?php echo sprintf(TEXT_REVIEW_BY, zen_output_string_protected($reviews->fields['customers_name'])); ?>

replace with:

<?php echo sprintf(TEXT_REVIEW_BY, zen_output_string_protected($reviews->fields['customers_firstname'])); ?>

This should output the customer's firstname only rather than the full name. :wink2:

12 May 2007, 8:59 AM
#7
long_tall_sally avatar

long_tall_sally

New Zenner

Join Date:
Feb 2007
Posts:
7
Plugin Contributions:
0

Re: Amending names on customer reviews

Thanks to all for your support :clap:- and a HUGE thank you to TheOracle for the time and effort.:hug:
Will let you know how we get on with it.

12 May 2007, 12:53 PM
#8
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: Amending names on customer reviews

Thanks for your positive input. Keep me posted. :smile:

13 May 2007, 3:22 PM
#9
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: Amending names on customer reviews

It would be great to have an update for the above modifications. :smile:

14 May 2007, 4:08 AM
#10
atomage avatar

atomage

New Zenner

Join Date:
Oct 2006
Posts:
15
Plugin Contributions:
0

Re: Amending names on customer reviews

Thank you! I will try this later this week. Hope it works out! Very appreciated.

19 Mar 2009, 9:48 AM
#11
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: Amending names on customer reviews

TheOracle:

It would be great to have an update for the above modifications. :smile:
OK, so 2 years later and finally some feedback.... it doesn't work.

I did what you said above and changed the code on those two files but the reviews still show the customers full name.

Is there a way to make the reviews show the customers first name and city only?

20 Mar 2009, 3:07 PM
#12
ajeh avatar

ajeh

Oba-san

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

Re: Amending names on customer reviews

NOTE: this will change new reviews ... old reviews you will need to edit in the database ...

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!

5 Apr 2009, 5:36 PM
#13
dazana avatar

dazana

New Zenner

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

Re: Amending names on customer reviews

All it did for me is replaced First Name, Last Name with blank.

"Reviewed by"

Is this old code that doesn't work with latest version?

5 Apr 2009, 8:08 PM
#14
ajeh avatar

ajeh

Oba-san

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

Re: Amending names on customer reviews

Sorry I did not read how poorly the SELECT statement was on this ...

Peek at the code change on post #3 of:
http://www.zen-cart.com/forum/showthread.php?t=84346

To only see the customers_firstname vs the customers_firstname and customers_lastname ...

This is really the cleaner way to get the correct data added to the review ...

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!

5 Apr 2009, 11:30 PM
#15
dazana avatar

dazana

New Zenner

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

Re: Amending names on customer reviews

Thank you, that worked for list of reviews, but didn't for individual review selected.

Finally I just hardcoded "tpl_product_review" info and default files with predefined response: "Community member"

<div class="productReviewsDefaultReviewer bold"><?php echo sprintf(TEXT_REVIEW_DATE_ADDED, zen_date_short($reviews['dateAdded'])); ?> <?php echo sprintf(TEXT_REVIEW_BY, zen_output_string_protected('Community Member'));?> </div>
6 Apr 2009, 2:32 AM
#16
ajeh avatar

ajeh

Oba-san

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

Re: Amending names on customer reviews

Make sure you are looking at new reviews ...

The Review is being build with just the customer's first name so you should not see anything but the first name anywhere on the reviews by changing that code to just contain the customers_firstname ...

For existing Reviews you would need to edit the customers_name field in the reviews table ...

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!