Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Need First Name only to show in Products_Review


matrix2223

Recommended Posts

I have found in the english.php define('TEXT_REVIEW_BY', 'by %s');

How do I get this to only show the customers first name?

 

Thank you,

 

Eric

 

The %s is populated by the catalog/product_reviews.php. It merges it with the customer_name field in the review table. The data is inserted in there by the product_review_write.php at line 48. Change the insert statement so it only includes the customers forename.

 

You'll probably want something like this;

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

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...