View Single Post
  #9  
Old 09-15-2013, 07:28 AM
 
Rob Barclay Rob Barclay is offline
 

Advanced Member
  
Join Date: Mar 2008
Posts: 38
 

Default Re: Adding a BCC email address to customer order completed

Ok for reference if anyone is trying to get this working in x-cart for Trustpilot here is what I did (what was said above does work but will send to trustpilot regardless of the order status: Queued, processed, failed, not finished etc etc.

To get it working only when the order is complete you need to do the following:

Inside of root: include/func/func.mail.php

Code:
$myBcc = ( strpos($mail_message, '<!-- ORDER COMPLETE -->')===false ) ? '' : "Bcc: YOUR_ID@trustpilotservice.com".$lend; $headers = "From: ".$company_mail_from.$lend.$myBcc."X-Mailer: X-Cart".$lend."MIME-Version: 1.0".$lend.$message_header;

Then because TrustPilot require the email of the customer in the body I added the following code to skin1/mail/html/order_customer_complete.tpl

At the top of the file I added:

Code:
<!-- ORDER COMPLETE -->

And then just after the customers name:

Code:
<br /> Email: {$customer.email}, <br />


Hope this is useful to others, maybe could be better but works well for me.
__________________
Version 4.6.1
Reply With Quote