almetuk Posted February 6, 2011 Share Posted February 6, 2011 How do you add a telephone number to the notification email that is sent to confirm the order I know the file is Checkout_Process.php but I dont know the line to put to add the Customer telephone number, can anyone help. Link to comment Share on other sites More sharing options...
npn2531 Posted February 7, 2011 Share Posted February 7, 2011 in checkout_process.php about line 310, change this: tep_address_label($customer_id, $sendto, 0, '', "\n") . "\n"; to this: tep_address_label($customer_id, $sendto, 0, '', "\n") . $order->customer['telephone']."\n" ."\n"; Oscommerce site: OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120 Link to comment Share on other sites More sharing options...
almetuk Posted February 8, 2011 Author Share Posted February 8, 2011 HI, this works, thank you, except, now the shop does not get the order confirmation email only the customer. the shop wants to have the Telephone and Fax Numbers on the order so they can use them to contact them. Now the customer gets the telephone number added but the owner of the store does not get any emails at all. Link to comment Share on other sites More sharing options...
almetuk Posted February 8, 2011 Author Share Posted February 8, 2011 HI, this works, thank you, except, now the shop does not get the order confirmation email only the customer. the shop wants to have the Telephone and Fax Numbers on the order so they can use them to contact them. Now the customer gets the telephone number added but the owner of the store does not get any emails at all. EMAIL DOES WORK Thank you, the only problem is we also need the mobile number, which we use the FAX field for, so do I just replace the word telephone with fax? Thank you. Link to comment Share on other sites More sharing options...
npn2531 Posted February 8, 2011 Share Posted February 8, 2011 Do two things first. 1) Look up about line 110 on checkout_process.php. You'll see this in that list: 'customers_telephone' => $order->customer['telephone'], Add this to that list just below it: 'customers_fax' => $order->customer['fax'], 2) Next open up includes/classes/order.php about line 32 find this in the long query line: customers_telephone, add customers_fax right after so it looks like this customers_telephone, customers_fax, Now your idea of replacing 'telephone' with 'fax' should work. Note that in the database there is a field customers.customers_telephone and another called customers.customers_fax. That's where these definitions come from. To be honest with you, I'm only about 90% sure you need to do step two above, and that that's the right place to do it. Oscommerce site: OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120 Link to comment Share on other sites More sharing options...
almetuk Posted February 8, 2011 Author Share Posted February 8, 2011 Cheers, 90% is good enough for me. I know this is different topic, but can you tell me how get it to accept a UK date of birth, DD/MM/YYY. I have changed it in the english.php but it still wont accept a UK birth date. Cheers, once this is done I can go live :) at last!!! Link to comment Share on other sites More sharing options...
npn2531 Posted February 8, 2011 Share Posted February 8, 2011 I don't know. But I do know that 'someplace' the date formats are defined and once you get the code snippet for the date format then you replace it 'somewhere'. If you figure it out, post it back on this thread, I'd like to know it myself. Oscommerce site: OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120 Link to comment Share on other sites More sharing options...
almetuk Posted February 8, 2011 Author Share Posted February 8, 2011 the fax still wont appear, it wanted the field added to the orders table, I have done that but it still wont show. As for the code for DD MM YY I found this code // Return date in raw format // $date should be in format DD/MM/yyyy // raw date is in format YYYYMMDD, or DDMMYYYY function tep_date_raw($date, $reverse = false) { if ($reverse) { return substr($date, 3, 2) . substr($date, 0, 2) . substr($date, 6, 4); } else { return substr($date, 6, 4) . substr($date, 0, 2) . substr($date, 3, 2); } but dont understand it. Link to comment Share on other sites More sharing options...
pdcelec Posted February 8, 2011 Share Posted February 8, 2011 the fax still wont appear, it wanted the field added to the orders table, I have done that but it still wont show. As for the code for DD MM YY I found this code // Return date in raw format // $date should be in format DD/MM/yyyy // raw date is in format YYYYMMDD, or DDMMYYYY function tep_date_raw($date, $reverse = false) { if ($reverse) { return substr($date, 3, 2) . substr($date, 0, 2) . substr($date, 6, 4); } else { return substr($date, 6, 4) . substr($date, 0, 2) . substr($date, 3, 2); } but dont understand it. function tep_date_raw($date, $reverse = false) { if ($reverse) { return substr($date, 0, 2) . substr($date, 3, 2) . substr($date, 6, 4); } else { return substr($date, 6, 4) . substr($date, 3, 2) . substr($date, 0, 2); } } Link to comment Share on other sites More sharing options...
almetuk Posted February 8, 2011 Author Share Posted February 8, 2011 Thanks for that, do you have any idea over the fax number on the confirmation order to the owner of the business. Link to comment Share on other sites More sharing options...
npn2531 Posted February 8, 2011 Share Posted February 8, 2011 Since you had to add the field to the orders table, then the place I had you add the customers_fax in 'step 2' was not the correct query to add it too. Delete the customers_fax from that query in includes/order.php and delete the field you added to the order table in the database. After you delete those, then look lower down in includes/orders.php around line 142. There is another query, that references the customers table. (Look at the end of the query and you can see the name of the table it references) look for c.customers_telephone, and add c.customers_fax, after it to get this: c.customers_telephone, c.customers_fax, Also make sure that the 'mobile' number you are adding is getting added to the database in the customers.customers_fax field Oscommerce site: OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.