Re: Customer Reviews, their full name is diplayed?
Are you telling me that in order to use customer reviews (which is an integral part of running a good webstore I would think), that we have to go through and fiddle around with the core code and modify it as noted in the above posts so that the customers first and last name will not be displayed?
Really, I would have thunk that with privacy issues as they are nowadays that the core code would already have a customer review system that was a little more privacy friendly out of the box.
Just my musings on the subject..
Re: Customer Reviews, their full name is diplayed?
Does anyone still read this post? I tried to add the changes, but it doesn't do what it says it's supposed to. The full name still shows up. I've been able to manipulate it a bit but now I've messed it up and it only shows: "."
Can anyone help? Thank you.
Re: Customer Reviews, their full name is diplayed?
Will this be part of a future release... say Zen-Cart 2.0? :cry:
Re: Customer Reviews, their full name is diplayed?
Quote:
Originally Posted by
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.
I took at a look at tpl_product_info_display.php and that doesn't appear to be the file we want.
I believe the file we're looking for is : /templates/template_default/templates/tpl_product_reviews_default.php
I suspect the code to be edited can be found around line(s) 64 and/or 68. I just don't know which of those to edit, and how exactly to edit them.
The code is below. Does anyone want to take a crack at it?
Line 64:
PHP Code:
<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($reviews['customersName'])); ?></div>
Line 68:
PHP Code:
<div class="productReviewsDefaultProductMainContent content"><?php echo zen_break_string(zen_output_string_protected(stripslashes($reviews['reviewsText'])), 60, '-<br />') . ((strlen($reviews['reviewsText']) >= 100) ? '...' : ''); ?></div>
Re: Customer Reviews, their full name is diplayed?
Quote:
Originally Posted by
Scott_C
Thanks to Richuno and Paul3648, Ive modified the code to truncate the last name on two of the reviews pages.
My solution (http://www.zen-cart.com/forum/showpo...0&postcount=16) includes going into the the database and changing the name. Once that's done, the full name won't appear anywhere. It works for me, but I guess if you're getting several reviews a day you might want to automate everything.
Re: Customer Reviews, their full name is diplayed?
Quote:
Originally Posted by
paul3648
My solution (
http://www.zen-cart.com/forum/showpo...0&postcount=16) includes going into the the database and changing the name. Once that's done, the full name won't appear anywhere. It works for me, but I guess if you're getting several reviews a day you might want to automate everything.
Hi Paul,
Thanks for your fast response! I did see where you had mentioned to go into the database and make a change there, but I didn't understand the "why" behind it and the effect it would have. Thanks for the clarification :smile:
I don't anticipate having so many reviews that doing this manually would be problematic, so that's what I will do for now.
But it sure would be nice to have it automated wouldn't it? One less thing to have to track :smile:
Re: Customer Reviews, their full name is diplayed?
Hi Paul, thats a good idea, and certainly easier than having to edit multiple php files. The reason I sought to edit the php pages though was to try and circumvent a full name going into the db to begin with. I guess then the choice is to either edit all php pages required to stop previous names showing in full, or to run a script to clean up the names of reviewers who have already submitted.
I have a programmer who does a lot of work for me, I'll get him to look at it once he's finished with some other 'todo' items. When we've worked out a decent fix, I'll share it with everyone in this thread.
Quote:
Originally Posted by
paul3648
My solution (
http://www.zen-cart.com/forum/showpo...0&postcount=16) includes going into the the database and changing the name. Once that's done, the full name won't appear anywhere. It works for me, but I guess if you're getting several reviews a day you might want to automate everything.
Re: Customer Reviews, their full name is diplayed?
I'm confused with Paul3648's solution, I made the recommended change and it works on some pages, but not on the product info page (such as this one: LINK)
I realize now that I used dgReviews to display the review on the product page. Is it possible to remove the last name from this page as well?
Also, you guys mention editing the database, can you explain how to do that? Thank you!
Re: Customer Reviews, their full name is diplayed?
Quote:
Originally Posted by
iscatech
I'm confused with Paul3648's solution, I made the recommended change and it works on some pages...
Three different people each submitted a solution, and each solution renders a result for a different page. In order to remove the last name from all of the pages, you have to implement all three of the solutions (if you want the process automated), or just implement both steps of Paul's solution (the second step is the database edit each time someone writes a review).
Those three solutions are:
richuno's solution affects individual Product Review Pages
Scott_C's solution affects the All Products Review Page
Paul3648's solution affects the Write a Review Page. However, if you also implement his suggested database edit, this will affect any page a product review appears on. But, it is a manual process, whereas the other edits automate the process. Unless you're having a ton of reviews, it's not that big of a deal to do manually until someone submits a fix for the final page where a last name is still appearing (All Reviews for a Single Product Page).
Quote:
Originally Posted by
iscatech
...but (the solutions don't work) on the product info page (such as this one:
LINK). I realize now that I used
dgReviews to display the review on the product page. Is it possible to remove the last name from this page as well?
Since you're using a Mod to create that, you'd have to talk to the Mod dev/author for a fix to it. But before you decide to keep this mod, you should be aware that this mod is four years and several ZC versions old and appears to be unsupported (due to the lack of updates)? If you really want to keep this old Mod, I strongly recommend using Paul's solution, because when you change the customer name in the review section of the database, it gets rid of it no matter where the review appears.
Quote:
Originally Posted by
iscatech
Also, you guys mention editing the database, can you explain how to do that? Thank you!
- Log in to your Cpanel
- Back Up Your Existing Database!!
- Go to phpMyAdmin
- Left Column shows list of your databases. Click on your ZC db
- Scroll left column to find zen_reviews & click it OR Scroll main window to find zen_reviews & click the browse icon
- You will see a list of customers who have written reviews.
- If there is only one, click the pencil icon to edit it
- If there is more than one, click "Check All" and then click the pencil icon to edit them
- To edit: Highlight and delete the last name, or all but the first letter of the last name, depending what you want to show on the pages.
- If editing only one, click the "go" button.
- If editing several, go to the bottom of the page and select "save" and "return to previous page" from the drop down options and then click the "go" button.
- You will need to repeat this db edit process every time a new review is posted until an automated fix is posted by some helpful user who knows what they're doing (i.e. not me <grin>).
Hope that helps :)
Re: Customer Reviews, their full name is diplayed?
The final edit needed (I think) is in tpl_product_info_display.php
Change line 64(ish)..
Code:
<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($reviews['customersName'])); ?></div>
T0..
Code:
<div class="productReviewsDefaultReviewer bold"><?php echo sprintf(TEXT_REVIEW_DATE_ADDED, zen_date_short($reviews['dateAdded'])); ?> <?php
list($review_first_name, $review_last_name) = split(' ', zen_output_string_protected($reviews['customersName']));$last_name_array = str_split($review_last_name,1); echo sprintf(TEXT_REVIEW_BY, $review_first_name).' '.$last_name_array[0].'.'; ?></div>
If you make the change above and these three changes already given previousely..
richuno's solution
Scott_C's solution
Paul3648's solution
All review pages will have truncated surnames including the write review page.
The full name will still be entered into the database so I guess less than perfect but is not displayed anywhere on the cart front end unless other mods are displaying it.
For those using dgReviews there is one more change to truncate the surname on the product page..
find the following line in tpl_dgReveiw.php
Code:
<div class="bold"><?php echo sprintf(TEXT_REVIEW_BY, zen_output_string_protected($reviews->fields['customers_name'])); ?></div>
and replace with..
Code:
<div class="bold"><?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>
It took a while to get there, but I got there in the end :D