Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Extra order email from customers email address


Recommended Posts

Hi there,

 

I've noticed that when a customer placeses an order, an extra order email is sent to my email address.

But as the senser of that email, OSC uses my own email address.

It's much easier to use the email address of the customer instead, so you can reply from out outlook and keep the reply's, instead of doing that in OSC.

 

Does any one know where to look for the sending of the extra order email?

Or even tell me how to do it.

 

Thanks.

Link to comment
Share on other sites

I dont think so, STORE_OWNER_EMAIL_ADDRESS is a constant variable, I dont beleive Customer email is

 

probally have to be something like $order_info['customer_email']

 

I have not looked that indepth in to the code. if you cant figure it out I might be able to look closer tommorow

Link to comment
Share on other sites

Ok,

 

That was probably too easy.

 

tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

 

SEND_EXTRA_ORDER_EMAILS_TO

this looks like the email address I want to send the extra email to (my own)

 

EMAIL_TEXT_SUBJECT

this should be the email header

 

$email_order

this should be the content of the order

 

STORE_OWNER

this is now my name as stated in the configuration, but would be nice to be altered to customers_firstname and customers_lastname.

 

STORE_OWNER_EMAIL_ADDRESS

this is the emailaddress of the webshop as stated in the configuration, but should be altered in the customers email address.

 

I don't know how to replace the last 2 for what I want.

 

When simply replacing STORE_OWNER for CUSTOMERS_LASTNAME (to start with, as first and lastname are more difficult) I get customer_lastname [[email protected]]

 

When simply replacing STORE_OWNER_EMAIL_ADDRESS into CUSTOMER_EMAIL_ADDRESS, I receive an email like [email protected]

 

So anyone, any help please

Link to comment
Share on other sites

Why do you want to send 2 order emails to the customer?

He does not, he wants the Order Confirmation that is emailed to him, to appear to be comming from the customer, not the store....

 

 

to do that change

 

// send emails to other people
 if (SEND_EXTRA_ORDER_EMAILS_TO != '') {
   tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
 }

 

to

 

// send emails to other people
 if (SEND_EXTRA_ORDER_EMAILS_TO != '') {
   tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, $order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address']);
 }

 

This is NOT test, Use at your own Risk, I accept no Resposibty for any errors, or down time

Link to comment
Share on other sites

OK, I get it.

Why?

well one I can think of off the bat is so that when an order is placed he can reply right to the client, using the "reply" feature of any email program., instead of copy and pasting the address in to a new Message

Link to comment
Share on other sites

Mike, you're the man, not only did you understand what I wanted, but you also gave me the solution.

It works, thanks.

no problem

 

Glad to see it works..

 

everytime I help someone here I learn more myself, which is the reason I do it,

 

by discecting the code and helping others, the solutions I provide to my clients come all that faster, better, and more accurate......

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...