Different email notification for different service
{if service == 2} Show one thing {endif} ...
Best regards,
Nikolaea_customer_mail_template
, there are three params that you will receive:
$body_template, $app_array, $params
Best regards,
NikolaHello Nikola,
I am looking to implement this.
I have managed to access and edit the $body_template, but I cant seem to pull the Service to compare its value in an If statement.
Would you be able to provide what I need to me the line of code so I can use service.:
if (service == 2) { Show one thing } else { Show other thing}.
Regards,
Cameron
Hello Nikola,
I just bought “Extension 2 Year Updates” is it possible to use support + servise to help me with implematation this feature. I can probably pay extra money. I am just starting with PHP code and this tast is ower beyond my power. It is for good things we are using Easy Appointments for booking Korona vacination. I need to send diferent instruction for people booking for AstraZeneca and for Pfizer.
Thank you in advance.
Regads
Martin
Hi Martin, if you are willing to invest some money we can ship that feature fast. 🙂
Best regards,
Nikola
Nikola,
This is somehting that I am looking to start using shortly. Do you have a contact e-mail in which we could discuss implementing this feature?
Many Thanks,
Cameron
function service_specific_email($body_template, $app_array, $params) {
$service = $params['#service#'];
if ($service == 1) {
$body_service = "Thank you ...";
} elseif ($service == 2) {
$body_service = "Thank you for";
} else {
$body_service = "Thank you for ...";
}
$newBody = $body_service . $body_template;
return ($newBody);
}
add_filter('ea_customer_mail_template', 'service_specific_email', 10, 3);
Hope this helps anyone else.Hi we will add that template engine soon. But this will also get things done 🙂
Best regards,
Nikola
To Note, this will interact with the cancellation message also, so I’ll be looking at fixing that. I’ll post my fix here when I do.
Thanks for your response Nikola.
function service_specific_email($body_template, $app_array, $params) {
$service = $params[‘#service#’];
$status = $params[‘#status#’];
if ($status == “confirmed”) {
if ($service == 1) {
//rest of code
}
}
Please login or Register to submit your answer