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)

DavyMac 04-17-2012 11:35 AM

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

DavyMac 04-23-2012 02:55 AM

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.

Rob Barclay 08-25-2013 03:55 AM

Re: Adding a BCC email address to customer order completed
 
Many thanks for this, appreciate you sharing.

carpeperdiem 08-25-2013 04:31 AM

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

Rob Barclay 08-25-2013 04:41 AM

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?

carpeperdiem 08-25-2013 04:53 AM

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

Rob Barclay 08-25-2013 05:34 AM

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.

Rob Barclay 08-25-2013 05:38 AM

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?

Rob Barclay 09-15-2013 07:28 AM

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.

Warwick 02-01-2014 01:14 AM

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.)


All times are GMT -8. The time now is 08:41 AM.

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