Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Need help: I want two different order emails sent.


Bigredman74

Recommended Posts

I know I can change the email that the customer gets by editing the "define('EMAIL " found in admin/includes/languages/english/orders.php. But I want to change the email that I receive when a customer places an order? I would like to place a link in this email that takes me to /catalog/admin/orders.php. (My /admin folder is password protected. )

 

Thanks in advance,

Tim

Link to comment
Share on other sites

Thanks for your reply. This will send the same email that the customer gets. I want to send the original to the customer, and a modified one to me.

 

Any suggestions?

Link to comment
Share on other sites

the email is made in checkout_process.php

you can try to change the email content and add a line to the end of it after it is sent to the customer in the same file i have changed mine to send it as an attachment adding a line should not be that hard

Link to comment
Share on other sites

Okay, I found this in the /catalog/checkout_process.php:

 

// 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);
 }

 

I have tried a number of different ways to add a link to the end of this such as:

 

?Please visit /catalog/admin/orders.php to retrieve cc info. You will need your login and password to access this information.?

 

How can I make this work? Examples of code would really help.

Link to comment
Share on other sites

Finally got it!

Thanks to tedbooks and PhilipH for his post here.

 

Here?s what I did:

 

1. Edited the code in /catalog/checkout_process.php

 

Old code

// 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);
}

 

New code

// send emails to other people
 if (SEND_EXTRA_ORDER_EMAILS_TO != '') {
     $admin_order = $email_order . 'Go to <a href="mylink">mylink</a>, then click the Edit button to retrieve the credit card number.<br>You will need your user name and password to access this info.';
     tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, $email_subject, $admin_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
 }

 

2. Then in the admin section of Configuration, E-mail Options, I set ?Use MIME HTML When Sending Emails? to ?true? to make the URL active in the email received.

 

I hope that someone else may benefit from this too.

 

All the best,

Tim

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...