Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to add email and phone to order bill?


dedeman

Recommended Posts

Posted

Can somebody tell me the way to implement the 'email' and 'phone' to order bill? I mean to display those at Shipping Address and Billing Address?

 

This is a model:

 

Artikelen

 

-===================================================-

 

1 x Projectiescherm () = €290,00

 

Afmeting 180x101,25cm 16:9 electrisch

 

-===================================================-

 

Sub-Totaal: €290,00

 

Vast tarief (Geen verzendkosten): €0,00

 

Totaal: €290,00

 

 

 

Verzendadres

 

-===================================================-

 

xxxxx

 

xxxxxx

 

xxxxxxx

 

Netherlands

 

E-mail: Recipiënts e-mail adress / Here to add the email

 

Tel.: Recipiënts Phone Number / Here to add the phone

 

 

 

Factuuradres

 

-===================================================-

 

xxxx

 

xxx

 

xxxxx

 

Netherlands

 

E-mail: E-mail address of person who ordered

 

Tel.: Phone Number of person who ordered

 

Many regards for those who can help me.

 

Thanks !

Posted

MAKE A BACKUP BEFORE MAKING ANY EDITS!!!

 

In checkout_process.php find this code:

 

  if ($order->content_type != 'virtual') {
$email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" . 
				EMAIL_SEPARATOR . "\n" .
				tep_address_label($customer_id, $sendto, 0, '', "\n") . "\n";
 }

 $email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" .
			  EMAIL_SEPARATOR . "\n" .
			  tep_address_label($customer_id, $billto, 0, '', "\n") . "\n\n";

Change to:

 

  if ($order->content_type != 'virtual') {
$email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" . 
				EMAIL_SEPARATOR . "\n" .
				tep_address_label($customer_id, $sendto, 0, '', "\n") . "\n";
$email_order .= 'E-mail: ' . $order->customer['email_address'] . "\n";
$email_order .= 'Tel.: ' . $order->customer['telephone'] . "\n";
 }

 $email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" .
			  EMAIL_SEPARATOR . "\n" .
			  tep_address_label($customer_id, $billto, 0, '', "\n") . "\n\n";
 $email_order .= 'E-mail: ' . $order->customer['email_address'] . "\n";
 $email_order .= 'Tel.: ' . $order->customer['telephone'] . "\n";

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 >

Posted

Thank you for this beautifull solution. Please kindly tell me how to insert some blank rows below

 

" $email_order .= 'Tel.: ' . $order->customer['telephone'] . "\n"; "

 

 

Thanks a lot!

Posted
$email_order .= 'Tel.: ' . $order->customer['telephone'] . "\n";

It's the RED code.

 

Change it to:

 

"\n\n"

Keep adding one at a time until you get what you want.

:thumbsup:

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 >

  • 4 weeks later...
Posted
Very good solution. Thanks a lot!

 

I agree lol

I was also searching for this solution.

Thanks ;)

  • 9 months later...
Posted

Hi germ,

 

I added this mod to my checkout_process.php but I don't see those input fields when I tried to checkout.

 

Yes I did clear my cache to try it out but nothing. I am using osCommerce 2.2 RC2 with several mods like PWA. No errors either. Just that I don't see those fields.

 

Any suggestions?

Posted

Hi germ,

 

I google this issue and found a much older thread from around 2007 and in there, was a mention of adding some lines in languages/english/checkout_process as well.

 

Does that apply here as well and if so, what must I add to the languages file?

 

Thanks.

Posted

Hi Germ,

 

Managed to get it working. Only problem is that if the customer uses a different shipping address (different from billing address) then the number is not recorded or ask for.

 

No where does it ask for a phone number if the shipping address was different from the billing address. How can I include that in the checkout_process?

 

In my case we deliver flowers and it's important for us to have the recipients contact number and not just the address. We like to call the recipient before delivery to ensure that he/she gets the flowers.

  • 2 weeks later...
Posted

Greetings all,

i am trying to do something similar, and had already made the mods above, but need to add two more fields to show on the orders email:

Cell Phone Carrier

Do you want to receive text messages.

 

I've added these to the Customers table, and have them storing successfully there, and also added the fields to the Orders table. However, i don't know how to get them to be added to the Orders table so that they can be pulled into the Orders email.

 

Can someone help me with that?

  • 3 weeks later...
Posted

This worked great!

Thank you! :rolleyes:

Archived

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

×
×
  • Create New...