View Single Post
  #11  
Old 02-04-2014, 11:47 AM
  DOPS85's Avatar 
DOPS85 DOPS85 is offline
 

Advanced Member
  
Join Date: Feb 2013
Posts: 32
 

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

Quote:
Originally Posted by Rob Barclay
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.

Has anyone gotten this to work yet. We are using the xtreme grea template and we do not have the mail/html/order_customer_complete.tpl file. We were able to use DavyMac's method, but it sends ever email including the inventory decreased notifications! Any help would be greatly appreciated.
__________________
X-Cart Version: 4.5.4
Reply With Quote