MagicalT Posted November 24, 2012 Posted November 24, 2012 Have searched the forum looking to remove last name on reviews, nothing else needs to change just the last name removed
MrPhil Posted November 24, 2012 Posted November 24, 2012 product_reviews.php puts the field "customers_name" into the review page. That's apparently the entire name. You would have to pull it out into a new variable and process it in some way, then use the variable in the output. It's tricky to isolate just the last name if it's given as one long string. If my name were Phil Van De Bogart, where would you cut off the "last" name? What might be more foolproof would be to change all words in the name to their first initial: P V D B. Some customers, when they write reviews, will be smart enough to realize that their name will be displayed and will anonymize it accordingly. Does the name used here come from the customer record or is it entered during the review? If it originally came from the customer record (purchase information), that's a violation of privacy to display it. I would think it sufficient to warn reviewers that whatever name they give will be printed with the review, so please just give their first name or initials if they want some privacy.
knifeman Posted November 25, 2012 Posted November 25, 2012 Try the suggestion here. I have removed last names on my site and I believe I did this: http://www.oscommerce.com/forums/topic/280737-how-to-remove-last-name-from-product-reviews/#entry1153668 Tim It has been awhile so I am not certain.
♥joli1811 Posted November 25, 2012 Posted November 25, 2012 @@knifeman An absolute mine of useful information Regards John To improve is to change; to be perfect is to change often.
♥mattjt83 Posted November 25, 2012 Posted November 25, 2012 You also try this: Find this in product_reviews.php: $reviews_query = tep_db_query($reviews_split->sql_query); while ($reviews = tep_db_fetch_array($reviews_query)) { Add this directly below: //BOF use customers firstname only $customers_name = explode(' ',$reviews['customers_name']); $reviews['customers_name'] = $customers_name[0]; //EOF use customers firstname only Please note this only changes what displays on the web page itself and doesnt alter the database at all. Matt
Recommended Posts
Archived
This topic is now archived and is closed to further replies.