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

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.

Rob Barclay 03-21-2014 12:34 PM

Re: Adding a BCC email address to customer order completed
 
I will have to look at this in a while, my wife is patiently waiting in the room to watch a film with me. I can give you two more minutes for the file then it will be in around 2 hours time when I can look Im afraid as Im getting my ass kicked.

suehamil 03-21-2014 12:41 PM

Re: Adding a BCC email address to customer order completed
 
Thanks Rob
Files on there way and pm'd you with my email
Sue

suehamil 03-21-2014 12:56 PM

Re: Adding a BCC email address to customer order completed
 
LOL, thanks Rob. Enjoy the film :o)
I may not be here in 2 hours (I'm gmt +2) but will get back to you tomorrow if I miss you tonight.
Sue

indizine 04-15-2014 02:40 AM

Re: Adding a BCC email address to customer order completed
 
Did anyone get this working? One of my clients has had someone insert the code as supplied in this thread, but it didn't work, still sent several emails when they only one the one invite sending upon order completion. Any ideas?


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

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