Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Adding a BCC email address to customer order completed

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #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
  #12  
Old 02-04-2014, 11:57 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default 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?
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #13  
Old 02-04-2014, 09:08 PM
  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

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?
__________________
X-Cart Version: 4.5.4
Reply With Quote
  #14  
Old 03-21-2014, 10:06 AM
 
suehamil suehamil is offline
 

Advanced Member
  
Join Date: Mar 2014
Posts: 96
 

Default 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
__________________
X-Cart DB Version: 4.7 GOLD
3rd Party Addons:
XMenus Responsive
XBanners2
Skin: Fashion Walk
Reply With Quote
  #15  
Old 03-21-2014, 12:00 PM
 
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

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/
__________________
Version 4.6.1
Reply With Quote
  #16  
Old 03-21-2014, 12:08 PM
 
suehamil suehamil is offline
 

Advanced Member
  
Join Date: Mar 2014
Posts: 96
 

Default 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
__________________
X-Cart DB Version: 4.7 GOLD
3rd Party Addons:
XMenus Responsive
XBanners2
Skin: Fashion Walk
Reply With Quote
  #17  
Old 03-21-2014, 12:14 PM
 
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

Hi Sue,

Can you upload your file to here.
__________________
Version 4.6.1
Reply With Quote
  #18  
Old 03-21-2014, 12:18 PM
 
suehamil suehamil is offline
 

Advanced Member
  
Join Date: Mar 2014
Posts: 96
 

Default 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?
__________________
X-Cart DB Version: 4.7 GOLD
3rd Party Addons:
XMenus Responsive
XBanners2
Skin: Fashion Walk
Reply With Quote
  #19  
Old 03-21-2014, 12:25 PM
 
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

just pm'd you my email address to send it to
__________________
Version 4.6.1
Reply With Quote
  #20  
Old 03-21-2014, 12:30 PM
 
suehamil suehamil is offline
 

Advanced Member
  
Join Date: Mar 2014
Posts: 96
 

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

okay, thanks.
__________________
X-Cart DB Version: 4.7 GOLD
3rd Party Addons:
XMenus Responsive
XBanners2
Skin: Fashion Walk
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 01:02 PM.

   

 
X-Cart forums © 2001-2020