Sheik58 Posted April 30, 2015 Share Posted April 30, 2015 I need gender of customer in confirmation email. In catalog/checkout_process.php there is around line 85: 'customers_name' => $order->customer['firstname'] for first name. How to add for gender? If that is not possible, how to query in DB? Regards Link to comment Share on other sites More sharing options...
♥ecartz Posted May 3, 2015 Share Posted May 3, 2015 I would say that the correct way would be to modify the cart() and query() functions in includes/classes/order.php to fetch this data. Then modify checkout_process.php to persist it. This would require modifying the orders table structure in the database though. The code just to get the gender would be something like $customer_query = tep_db_query("SELECT customers_gender FROM " . TABLE_CUSTOMERS . " WHERE customers_id = '" . (int)$customer_id . "'"); $customer_data = tep_db_fetch_array($customer_query); $customer_gender = $customer_data['customers_gender']; Always back up before making changes. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.