Freddy.K Posted May 23, 2010 Share Posted May 23, 2010 Hello! I'm developing an adult shop where I believe customers may not want to post reviews if their full name will be shown, and I wouldn't want to miss out on customer reviews :rolleyes: I have managed to only show the first name in /catalog/products_reviews.php as per these instructions, but when I try to apply the same edits to /catalog/products_reviews_info.php it (surprisingly enough :P ) doesn't work. Any ideas of how to accomplish this? Thanks in advance! Link to comment Share on other sites More sharing options...
Freddy.K Posted May 25, 2010 Author Share Posted May 25, 2010 Anyone? (bump) Link to comment Share on other sites More sharing options...
Freddy.K Posted May 26, 2010 Author Share Posted May 26, 2010 Trying the ol' bumb again - could really use a hand here if anyone has any clues! Thanks :blush: Link to comment Share on other sites More sharing options...
Guest Posted May 26, 2010 Share Posted May 26, 2010 The best option is to not put the last name in the db in the first place. In catalog/product_reviews_write.php find $customer_query = tep_db_query("select customers_firstname, customers_lastname from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customer_id . "'"); Change to $customer_query = tep_db_query("select customers_firstname from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customer_id . "'"); 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())"); Change to 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())"); Find <td class="main"><?php echo '<b>' . SUB_TITLE_FROM . '</b> ' . tep_output_string_protected($customer['customers_firstname'] . ' ' . $customer['customers_lastname']); ?></td> Change to <td class="main"><?php echo '<b>' . SUB_TITLE_FROM . '</b> ' . tep_output_string_protected($customer['customers_firstname']); ?></td> Link to comment Share on other sites More sharing options...
Freddy.K Posted May 27, 2010 Author Share Posted May 27, 2010 A kazillion thanks bktrain! :) Works perfectly! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.