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
  #1  
Old 04-17-2012, 11:35 AM
 
DavyMac DavyMac is offline
 

eXpert
  
Join Date: Apr 2007
Location: Poole, UK
Posts: 333
 

Default Adding a BCC email address to customer order completed

Can anyone tell me how to add an additional email address recipient to the customer's order complete email. We are signing up to TrustPilot and we need to BCC them on the order complete email. Trustpilot will then ask the customer to rate us against the customer's order number.

Thanks,

David
__________________
X-Cart GOLD Plus v4.5.4
CDSEO Pro
ewdhosting Dedicated Server
Dedicated SSL
Stone Edge OM
Reply With Quote
  #2  
Old 04-23-2012, 02:55 AM
 
DavyMac DavyMac is offline
 

eXpert
  
Join Date: Apr 2007
Location: Poole, UK
Posts: 333
 

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

OK then, as is usual I shall answer my own question:

In file func.mail.php find the following line

PHP Code:
$headers =  "From: ".$mail_from.$lend."X-Mailer: PHP/".phpversion().$lend."MIME-Version: 1.0".$lend.$message_header

and simply add the bcc label and email address to the header like this

PHP Code:
$headers =  "From: ".$mail_from.$lend."Bcc: recipient@site.ext".$lend."X-Mailer: PHP/".phpversion().$lend."MIME-Version: 1.0".$lend.$message_header

where recipient@site.ext is the email address you wish to bcc to.
__________________
X-Cart GOLD Plus v4.5.4
CDSEO Pro
ewdhosting Dedicated Server
Dedicated SSL
Stone Edge OM
Reply With Quote

The following 8 users thank DavyMac for this useful post:
chamberinternet (07-20-2012), heather@MX1 (05-17-2012), qualiteam (02-02-2014), Rob Barclay (08-25-2013), suehamil (03-21-2014), timbojangles (07-01-2013), Tom Roe (03-18-2013), zone1creative (10-13-2019)
  #3  
Old 08-25-2013, 03:55 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

Many thanks for this, appreciate you sharing.
__________________
Version 4.6.1
Reply With Quote
  #4  
Old 08-25-2013, 04:31 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 DavyMac
We are signing up to TrustPilot

David,
Are you still happy with TrustPilot? The pricing is pretty steep for only 300 reviews a month...
Thx
J
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #5  
Old 08-25-2013, 04:41 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

we have paid ё2700GBP for one year with 3500 reviews per month. How does this compare?
__________________
Version 4.6.1
Reply With Quote
  #6  
Old 08-25-2013, 04:53 AM
 
carpeperdiem carpeperdiem is offline
 

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

Default Re: TrustPilot

Quote:
Originally Posted by Rob Barclay
we have paid ё2700GBP for one year with 3500 reviews per month. How does this compare?

That's about US$ 350/month for 3500 -- much cheaper (per review) than their "published" pricing of US$250 for only 300 reviews.

This thread just jumped the shark/hijacked! Sorry!!
Rob, how long have you been using TrustPilot? Did you use ACR or x-cart reviews (or other review system) prior to TrustPilot? If so, were you able to integrate/combine? Any issues with google rich snippets?

Did you look at other review providers?

Trying to justify the cost/benefit.
Thanks for sharing.

Jeremy

PS -- I am configuring currency display (we are on the other side of the pond) - and I see you formatted the currency as "ё2700GBP" -- X-Cart is forcing me to put the currency entirely to the left of the price. Would it be a crime/offend our UK customers to list our products as:

GBPё 22.61
or should there be a space after GBP?
Asking everyone I meet about their local currency LOL!
Thx
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #7  
Old 08-25-2013, 05:34 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

I would display with a space if possible but it is clear even with GBPё so would not be too concerned to be honest.

We use xcart reviews but customers tend to trust the independant reviews on Trust Pilot more. We only started 4 days ago. We went with them because we believe it will help our google PPC campaign to get a better click through rate.

We negotiated the deal over the phone they originally wanted close to ё4000.00 GBP per year equivalent for 3500 reviews but I said I would pay 1 year in advance at ё2500 and they came back with ё2700 so we took it.
__________________
Version 4.6.1
Reply With Quote
  #8  
Old 08-25-2013, 05:38 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

I see this change to func.mail.php also sends mail to the bcc for every action:

Creation of accounts
order accepted
order complete etc

Has anyone integrated this so it only sends when the order is marked as complete?
__________________
Version 4.6.1
Reply With Quote
  #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

The following 2 users thank Rob Barclay for this useful post:
suehamil (03-21-2014), Warwick (02-04-2014)
  #10  
Old 02-01-2014, 01:14 AM
  Warwick's Avatar 
Warwick Warwick is offline
 

X-Adept
  
Join Date: Mar 2003
Location: Somewhere on the web through European connection
Posts: 868
 

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

Quote:
Originally Posted by DavyMac
Can anyone tell me how to add an additional email address recipient to the customer's order complete email.

With this you mean the mail that is sent when the status of the order has been set to finished?
I am having a simular issue with a service like Trustpilot but the mail needs to be sent when the order status has been set to finished.

EDIT: overlooked the post before my post, which describes what I asked about.
Hopefully this works, anybody tried this?

ANOTHER EDIT: I got it working with 4.2.x
But then you need to change:
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;

To:
Code:
$myBcc = ( strpos($mail_message, '<!-- ORDER COMPLETE -->')===false ) ? '' : "Bcc: YOUR_ID@trustpilotservice.com".$lend; $headers = "From: ".$mail_from.$lend.$myBcc."X-Mailer: X-Cart".$lend."MIME-Version: 1.0".$lend.$message_header;
(Note the change of .$company_mail_from. to .$mail_from.)
__________________
Installs: X-Cart 4.1.x - 4.4.x ∙∙ MySQL version: 5.0.45 ∙∙ Apache version: 2.2.8 (Unix) ∙∙ PHP version: 5.25
X-Cart add-ons: all ∙∙ Mods: A lot; too many ∙∙ Skin templates: Many
∙∙ Experience: Somewhere beyond newbie
-----------------------------------
------------------------------------------------------------------------------------------------------
Looking for the best dutch language pack? 4.1.x - 4.6.x compatibel, native speaker translation! More info
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 09:16 AM.

   

 
X-Cart forums © 2001-2020