Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Reviews to display first name ONLY!


randynchicago

Recommended Posts

Posted

When viewing reviews written by customers, I would like their FIRST NAME ONLY to display instead of their full name.

 

This has to be an easy change in a php file...anyone familiar with how to do this?

 

Thanks for the help!!

Randy

 

Sorry, I posted a question here...Now I can't find a way to delete the post!!

Posted

Change line 48 in product_reviews_write.php:

 

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())");

 

 

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())");

 

 

 

This will not edit data that already exists, so if you have existing reviews, you'll need to remove the last name from all the records.

Contributions

 

Discount Coupon Codes

Donations

  • 2 weeks later...
Posted
Change line 48 in product_reviews_write.php:

 

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())");

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())");

This will not edit data that already exists, so if you have existing reviews, you'll need to remove the last name from all the records.

 

 

Thank you kgt, this was useful also for me!

Archived

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

×
×
  • Create New...