OK,
BEFORE STARTING BACKUP YOUR FILE. THIS EDITS A CORE FILE
Here is a better solution: This allows the full name to be stored for the site owner but display only a first name on the review screen.
Ignore my previous post and leave that file alone.
The file to revise for displaying one name only is
Code:
includes\modules\pages\product_reviews\header_php
Find this section:
Code:
$reviewsArray = array();
while (!$reviews->EOF) {
$reviewsArray[] = array('id'=>$reviews->fields['reviews_id'],
'customersName'=>$reviews->fields['customers_name'],
'dateAdded'=>$reviews->fields['date_added'],
'reviewsText'=>$reviews->fields['reviews_text'],
'reviewsRating'=>$reviews->fields['reviews_rating']);
$reviews->MoveNext();
}
change to
Code:
$reviewsArray = array();
while (!$reviews->EOF) {
$array=explode(" ",$reviews->fields['customers_name']);
$array_count=count($array);
echo $array_count;
$sentence=$array[0];
$reviewsArray[] = array('id'=>$reviews->fields['reviews_id'],
'customersName'=>$sentence,
'dateAdded'=>$reviews->fields['date_added'],
'reviewsText'=>$reviews->fields['reviews_text'],
'reviewsRating'=>$reviews->fields['reviews_rating']);
$reviews->MoveNext();
}
I take no credit for this. I used google to search on how to find a space and just modified it slightly to work. Use at your own risk.