WOW DrByte you rock!! I was looking at that area but I was banging my head against the wall.I am going to try this today!
Printable View
WOW DrByte you rock!! I was looking at that area but I was banging my head against the wall.I am going to try this today!
Hi,
I know I am trying to awake a very old thread, but this has been a great information from your side, and helped me a lot.
Now I have a question, what if I want emails to go to different email ids for different groups.
I am novice at any coding :(
Dr Byte,
I need your expertise advise on my problem.
I have used your observer and Notifiers , as adviced in this post earlier. This works like a Dream for me! Thanks very much.
Now I need this functionality for mutiple Group IDs for sending mail to different email ids.. Is there a way to change the above code and use it?
I tried using If statement but gives a blank page on opening my website, or 500 error.
Thanks!
Try changing this:to this:Code:if (!$group_query->EOF && $group_query->fields['customers_group_pricing'] == $this->specialGroupId) {
zen_mail('', $this->specialGroupEmailAddress,
$this->orderEmailSubjectPrefix . EMAIL_ORDER_NUMBER_SUBJECT . $zf_insert_id,
$email_order . $extra_info['TEXT'], STORE_NAME, EMAIL_FROM, $html_msg, 'checkout_extra', $this->attachArray);
}
And then customize the numbers and email addresses as needed.Code:if (!$group_query->EOF) {
$this->specialGroupEmailAddress = '';
switch($group_query->fields['customers_group_pricing']) {
case '1':
$this->specialGroupEmailAddress = 'email_address_for_group_1@e_mail.com';
$this->orderEmailSubjectPrefix = 'Order Fulfillment Request from ' . STORE_NAME;
break;
case '2':
$this->specialGroupEmailAddress = 'email_address_for_group_2@e_mail.com';
$this->orderEmailSubjectPrefix = 'Order Fulfillment Request from ' . STORE_NAME;
break;
case '3':
$this->specialGroupEmailAddress = 'email_address_for_group_3@e_mail.com';
$this->orderEmailSubjectPrefix = 'Order Fulfillment Request from ' . STORE_NAME;
break;
default:
}
if ($this->specialGroupEmailAddress != '')
zen_mail('', $this->specialGroupEmailAddress,
$this->orderEmailSubjectPrefix . EMAIL_ORDER_NUMBER_SUBJECT . $zf_insert_id,
$email_order . $extra_info['TEXT'], STORE_NAME, EMAIL_FROM, $html_msg, 'checkout_extra', $this->attachArray);
}
Dr Byte,
Thanks for all your valuable support.
Sir one more question,
If I need to send mail to two or more email ids for same Group ID. In that case what shall I Do?
Change this:to this:Code:$this->specialGroupEmailAddress = 'email_address_for_group_3@e_mail.com';
Code:$this->specialGroupEmailAddress = 'Name1<email_address_1@e_mail.com>, Name2<email_address_2@e_mail.com>';
You must use all the code, in context. Just that snippet alone won't work.