X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Adding a BCC email address to customer order completed (https://forum.x-cart.com/showthread.php?t=63310)

DOPS85 02-04-2014 11:47 AM

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.

carpeperdiem 02-04-2014 11:57 AM

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

Originally Posted by DOPS85
we do not have the mail/html/order_customer_complete.tpl file.


Sure you do.

/skin/common_files/mail/html/order_customer_complete.tpl

Templates are always in /skin/common_files/ UNLESS a skin wants its own version -- then xcart looks to the version in

/skin/YOUR-SKIN/yadda-yadda
and this file supersedes
/skin/common_files/

got it?

DOPS85 02-04-2014 09:08 PM

Re: Adding a BCC email address to customer order completed
 
Well there she blows! Now I will attempt to add:

$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;

to the file. does it matter exactly where it goes?

suehamil 03-21-2014 10:06 AM

Re: Adding a BCC email address to customer order completed
 
Hi
I've tried using both versions of this code and in both case it seems to stop all notifications from being sent, so I'm thinking it's breaking the send code somehow.
I'd appreciate any ideas on what may be happening or how/where to look for issues.
Thanks
Sue

Rob Barclay 03-21-2014 12:00 PM

Re: Adding a BCC email address to customer order completed
 
are you adding my code as well as the original code or editing your original code?

Check you haven't got this in twice, you need to edit the code you have not add this in addition/

suehamil 03-21-2014 12:08 PM

Re: Adding a BCC email address to customer order completed
 
hi rob
Thanks for the reply.
I edited the original code exactly as you posted. Also my order_customer_complete.tpl is in skin/common_files/mail/html not skin1
Sue

Rob Barclay 03-21-2014 12:14 PM

Re: Adding a BCC email address to customer order completed
 
Hi Sue,

Can you upload your file to here.

suehamil 03-21-2014 12:18 PM

Re: Adding a BCC email address to customer order completed
 
Yes, but how do I do that Rob? :) Should I just paste the code? If so all of it or just the relevant bits?

Rob Barclay 03-21-2014 12:25 PM

Re: Adding a BCC email address to customer order completed
 
just pm'd you my email address to send it to

suehamil 03-21-2014 12:30 PM

Re: Adding a BCC email address to customer order completed
 
okay, thanks.


All times are GMT -8. The time now is 12:50 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.