Platinum Games Posted June 25, 2009 Posted June 25, 2009 i remember i have seen this a few years ago to change the customers full name to just the first name in the reviews. can someone please remind me of what to change this too. <span class="smallText">' . sprintf(TEXT_REVIEW_BY, tep_output_string_protected($reviews['customers_name'])) . '</span>'; i did try this but it didn't work <span class="smallText">' . sprintf(TEXT_REVIEW_BY, tep_output_string_protected($reviews['customers_firstname'])) . '</span>'; thanks, Thanks in advance! Ben
BryceJr Posted June 25, 2009 Posted June 25, 2009 Open product_reviews_write.php - stock oscommerce Line 48 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())"); Any previous reviews prior to the change will show fullnames even after the alterations. For previous reviews to show first names, you need to go to the database and change it in the reviews table.
Platinum Games Posted July 5, 2009 Author Posted July 5, 2009 Open product_reviews_write.php - stock oscommerce Line 48 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())"); Any previous reviews prior to the change will show fullnames even after the alterations. For previous reviews to show first names, you need to go to the database and change it in the reviews table. Perfect thanks! Thanks in advance! Ben
Recommended Posts
Archived
This topic is now archived and is closed to further replies.