GoTTi Posted May 23, 2007 Posted May 23, 2007 i dont want my customers names to be shown on reviews the leave. how can i disable that?
dropdeadred Posted May 23, 2007 Posted May 23, 2007 Find this in reviews.php: <td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $reviews['products_id'] . '&reviews_id=' . $reviews['reviews_id']) . '"><u><b>' . $reviews['products_name'] . '</b></u></a> <span class="smallText">' . sprintf(TEXT_REVIEW_BY, tep_output_string_protected($reviews['customers_name'])) . '</span>'; ?></td> And get rid of the customer name bit by changing it to this: <td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $reviews['products_id'] . '&reviews_id=' . $reviews['reviews_id']) . '"><u><b>' . $reviews['products_name'] . '</b></u></a> '; ?></td>
GoTTi Posted May 24, 2007 Author Posted May 24, 2007 with what you said, i just removed the customer name line out of product_reviews_info.php and it worked. when i did it to the reviews.php file, nothing happend. what exactly did yours do?
GoTTi Posted May 24, 2007 Author Posted May 24, 2007 nevermind i see what it did. i never look @ the reviews.php page, i always just follow the link from the cart's pages to a review for each item that is in rotation. removing the customers name line from both files works as well. thanks for the info
rrrhythm Posted May 24, 2007 Posted May 24, 2007 you can also modify the file product_reviews_write.php so that what it writes to the database is not the customers first and last name, but only their first name, so that reviews are only identified by the writers first name. in product_reviews_write.php, find tep_db_query("insert into " . TABLE_REVIEWS . " (products_id, customers_id, customers_name, reviews_rating, date_added) values ('" . (int)$HTTP_GET_VARS['products_id'] . "', '" . (int)$customer_id . "', '" . tep_db_input($customer['customers_firstname']) . ' ' . tep_db_input($customer['customers_lastname']) . "', '" . tep_db_input($rating) . "', now())"); replace it with something like: tep_db_query("insert into " . TABLE_REVIEWS . " (products_id, customers_id, customers_name, reviews_rating, date_added) values ('" . (int)$HTTP_GET_VARS['products_id'] . "', '" . (int)$customer_id . "', '" . tep_db_input($customer['customers_firstname']) . "', '" . tep_db_input($rating) . "', now())"); you can also go into the database and use phpMyAdmin to change customers_name in TABLE_REVIEWS, from full name to first name only for any reviews already written, and assuming that there aren't so many to change that it would be a pain. YMMV. i haven't tested this exact query, but think it's right. cheers, rj
Recommended Posts
Archived
This topic is now archived and is closed to further replies.