Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Changing Customer Information in Reviews


austinkamshan

Recommended Posts

Posted

Does anyone know how to change customer reviews to show just the customer's first name with city and state? I want it to look like this: Kamie from Austin, TX. I think that would increase reviews since a lot of people are very concerned about their identity on the web.

 

I understand that the city and state will have to be added to the database, but I am too chicken to mess around with the database since I am so new to the whole concept of databases.

 

The existing code in my product_reviews_write.php is below.

 

  $customer_query = tep_db_query("select customers_firstname, customers_lastname from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customer_id . "'");

 $customer = tep_db_fetch_array($customer_query);

 

and 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($customer['customers_lastname']) . "', '" . tep_db_input($rating) . "', now())");

     $insert_id = tep_db_insert_id();

 

Any assistance is greatly appreciated! Oh, I am using 2.2 M2

 

Thanks,

Kamie

Posted

I guess this question probably has been asked already, therefore no one is going to reply. (Fully understandable.) So, if anyone will be so kind to show me the post, I will be very appreciative. :) I have searched and searched, but it is very possible that I missed it.

 

I have tried messing around with the database fields, but it is not happening for me. My brain is just mush right now and I cannot get it to work at all.

 

I'll take any assistance that you can provide me.

 

Thanks,

 

Kamie

Archived

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

×
×
  • Create New...