- Posts: 86290
- Thank you received: 14269
Send order status notification to multiple people
Please Log in or Create an account to join the conversation.
Adding the folowing code did not work for me.
I pasted it in ORDER_CREATION_NOTIFICATION_SUBJECT in System->Emails
Is it for joomla 2.5?
I really can use this so hopefully someone can help.
Thanks.
Please Log in or Create an account to join the conversation.
It is for Joomla 1.5, 2.5 and 3.x
The code add the address "myemail@mywebsite.com" in blind carbon copy for the email.
For most I know, it should work.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
Strange that it doesn't work for me.
I've put the code on top as you can see below:
Is there a way to see what could be the problem?
Can I PM you the login and password so you can see if there is something wrong in my code in mail template.
Thanks.
Please Log in or Create an account to join the conversation.
Thanks to try with:
Please Log in or Create an account to join the conversation.
I tried it with $mail->addBCC instead of $this->mailer->addBCC like suggested but I got an error (see below).
The beginning of the Order Creation Notification mail looks like this with the new code:
Like I said I got the following error:
Line 13 is $mail->addBCC('xxxxxxx@gmail.com');
Any advice?
It would really be great to get this working.
Thanks by the way for trying to help. It's always appreciated.
Please Log in or Create an account to join the conversation.
In the email parameters have you enabled the HTML version ? (Send HTML option)
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
It must be plugged on the function: onBeforeMailSend(&$mail,&$mailer)
Where mail is the current $email and $mailer the Joomla mail instance.
Something like:
Please Log in or Create an account to join the conversation.
I created a folder bccmail under plugins/hikashop/ and I made bccmail.xml and bccmail.php
In bccmail.php I added the following code:
What do I need to do so that this plugin is triggered in the Order creation notification.
Do I need to add some code in the "Order creation notification" email?
I'm not sure how this plugin knows when to get executed.
Thanks.
EDIT: I did not make anything else like an installation file since I have no experience with making plugins.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Great!!!!!
I can confirm that it works to add BCC this way.
Thanks Xavier!!!
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
You can't find any zip file. You have to create it.
SG created a Joomla plugin and Nicolas explained him how install it easily in his website : by zipping the two files (php and xml) into a zip.
You can see more about how creating a joomla plugin in the official joomla documentation.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
I have written the plugin based on SG's code, with modifications to allow multiple addresses.
WARNING: I am not familiar with programming, hence the code may be amateurish. Test it out before using it on the production site.
On a side note, how do I target only specific emails. Right now it seemed like all the emails have bcc appended to it.
EDIT: It seemed like after uploading the file, the forum changes the name of my file. Does the name of the zip file matter in plugins?
Please Log in or Create an account to join the conversation.
You can do a test on $mail->mail_name
For example :
if($mail->mail_name!='order_status_notification') return true;
//code after is only for the order status notification email which is sent when orders are confirmed
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- Posts: 171
- Thank you received: 9
Thanks,
PePe
Please Log in or Create an account to join the conversation.
You should be able to add a check on "$mail->order->order_status", something like:
Please Log in or Create an account to join the conversation.
- Posts: 171
- Thank you received: 9
Xavier wrote: Hi,
You should be able to add a check on "$mail->order->order_status", something like:Code:if($mail->order->order_status == 'confirmed'){ // add the bcc email }
If anyone needs the same, I got it to work by taking these lines to the mail's PHP (preload version):
if($data->order->order_status == 'confirmed'){
$this->mailer->addBCC('xxxx@gmail.com');
}
Thanks again.
Please Log in or Create an account to join the conversation.