Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Add phone+fax in the confirmation-email


thomas_lundqvist

Recommended Posts

Hi!

 

How can I add phone+fax in the confirmation-email?

 

I found the rigth file checkout_process.php and my languagefile but its over my head how to add phone and fax in the email.

 

Thanks in advance!

 

/Thomas

Running osCommerce Online Merchant v2.2 RC2a - http://www.takbox.se/butiken

Link to comment
Share on other sites

Added the phone number here:

 

Click Me

 

If you need help with the FAX, let me know

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

	$email_order .= 'E-mail: ' . $order->customer['email_address'] . "\n";
$email_order .= 'Tel.: ' . $order->customer['telephone'] . "\n";
$email_order .= 'FAX: ' . $order->customer['fax'] . "\n";

My code doesn't have FAX so this is just a guess.

:blush:

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Nope, doesn't work.... Thanks anyway.

 

/Thomas

Turns out it doesn't work because 'fax' isn't stored in the customer array within the order class. I think you can easily add it though. Just 2 simple changes to make in order.php, first extracts fax into $customer_address_query, second copies that into order->customer array.

 

See includes/classes/order.php, around line 143:

	  $customer_address_query = tep_db_query("select c.customers_firstname, c.customers_lastname, c.customers_telephone, c.customers_fax, c.customers_email_address, ab.entry_company, ab.entry_street_address, ab.entry_suburb, ab.entry_postcode, ab.entry_city, ab.entry_zone_id, z.zone_name, co.countries_id, co.countries_name, co.countries_iso_code_2, co.countries_iso_code_3, co.address_format_id, ab.entry_state from " . TABLE_CUSTOMERS . " c, " . TABLE_ADDRESS_BOOK . " ab left join " . TABLE_ZONES . " z on (ab.entry_zone_id = z.zone_id) left join " . TABLE_COUNTRIES . " co on (ab.entry_country_id = co.countries_id) where c.customers_id = '" . (int)$customer_id . "' and ab.customers_id = '" . (int)$customer_id . "' and c.customers_default_address_id = ab.address_book_id");   // added fax too
  $customer_address = tep_db_fetch_array($customer_address_query);

then around line 243:

	  $this->customer = array('firstname' => $customer_address['customers_firstname'],
						  'lastname' => $customer_address['customers_lastname'],
						  'company' => $customer_address['entry_company'],
						  'street_address' => $customer_address['entry_street_address'],
						  'suburb' => $customer_address['entry_suburb'],
						  'city' => $customer_address['entry_city'],
						  'postcode' => $customer_address['entry_postcode'],
						  'state' => ((tep_not_null($customer_address['entry_state'])) ? $customer_address['entry_state'] : $customer_address['zone_name']),
						  'zone_id' => $customer_address['entry_zone_id'],
						  'country' => array('id' => $customer_address['countries_id'], 'title' => $customer_address['countries_name'], 'iso_code_2' => $customer_address['countries_iso_code_2'], 'iso_code_3' => $customer_address['countries_iso_code_3']),
						  'format_id' => $customer_address['address_format_id'],
						  'telephone' => $customer_address['customers_telephone'],
						  'fax' => $customer_address['customers_fax'],									// added fax here
						  'email_address' => $customer_address['customers_email_address']);

You should then be able to access the fax number as suggested by Germ above.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...