Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Very simple question!


Platinum Games

Recommended Posts

Posted

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

Posted

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.

  • 2 weeks later...
Posted
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

Archived

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

×
×
  • Create New...