Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Hide full name in review


Freddy.K

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...