CHANGE_PLACEMENT_MAIL_TEMPLATE
This commit is contained in:
parent
c96a06fcfc
commit
7e6ecd570d
@ -1089,6 +1089,7 @@ class LeadsController extends BaseController
|
|||||||
|
|
||||||
// 7. Define mail templates as constants or config
|
// 7. Define mail templates as constants or config
|
||||||
$mail_content = $this->getMailTemplate();
|
$mail_content = $this->getMailTemplate();
|
||||||
|
$placement_mail_content = $this->getMailTemplate('placement');
|
||||||
$subject = $this->getSubjectTemplate($lead_data);
|
$subject = $this->getSubjectTemplate($lead_data);
|
||||||
|
|
||||||
// 8. Pre-calculate sum assured only for GPA
|
// 8. Pre-calculate sum assured only for GPA
|
||||||
@ -1097,7 +1098,7 @@ class LeadsController extends BaseController
|
|||||||
// 9. Transform mail content once
|
// 9. Transform mail content once
|
||||||
$data['mail_content'] = $this->transformMailContent($lead_data, $mail_content, $data['page_name']);
|
$data['mail_content'] = $this->transformMailContent($lead_data, $mail_content, $data['page_name']);
|
||||||
$data['subject'] = $this->transformMailContent($lead_data, $subject, $data['page_name']);
|
$data['subject'] = $this->transformMailContent($lead_data, $subject, $data['page_name']);
|
||||||
$data['placement_mail_content'] = $this->transformMailContent($lead_data, $mail_content, 'Placement');
|
$data['placement_mail_content'] = $this->transformMailContent($lead_data, $placement_mail_content, 'Placement');
|
||||||
$data['placement_subject'] = $this->transformMailContent($lead_data, $subject, 'Placement');
|
$data['placement_subject'] = $this->transformMailContent($lead_data, $subject, 'Placement');
|
||||||
|
|
||||||
// 10. Combine related queries
|
// 10. Combine related queries
|
||||||
@ -1150,8 +1151,26 @@ class LeadsController extends BaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 13. Extract mail template to separate method for reusability
|
// 13. Extract mail template to separate method for reusability
|
||||||
private function getMailTemplate()
|
private function getMailTemplate( $template_type = "" )
|
||||||
{
|
{
|
||||||
|
if($template_type == 'placement'){
|
||||||
|
return '
|
||||||
|
<p>Dear Sir,</p>
|
||||||
|
<p>Greetings From Nhance India!</p>
|
||||||
|
<p>Please find attached the {{RFQ_OR_QCR}} for <strong>{{POLICY_TYPE}}</strong> policy pertaining to <strong>{{CLIENT_NAME}}</strong>.</p>
|
||||||
|
<p>Kindly request you to issue the policy at the earliest.</p>
|
||||||
|
<p>In case of any query, please feel free to contact us.</p>
|
||||||
|
<p>Thank You!</p><br>
|
||||||
|
<p>Best regards,</p>
|
||||||
|
|
||||||
|
<div style="margin: 0; padding: 0; line-height: 1.2;">
|
||||||
|
<div>{{LOGGED_USER_NAME}}</div>
|
||||||
|
<div>Mobile: {{LOGGED_USER_MOBILE}}</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<img src="{{LOGO_PATH}}" alt="Nhance Logo" width="100" style="margin-top:10px;">
|
||||||
|
';
|
||||||
|
}else{
|
||||||
return '
|
return '
|
||||||
<p>Dear Sir,</p>
|
<p>Dear Sir,</p>
|
||||||
<p>Greetings From Nhance India!</p>
|
<p>Greetings From Nhance India!</p>
|
||||||
@ -1169,6 +1188,7 @@ class LeadsController extends BaseController
|
|||||||
<img src="{{LOGO_PATH}}" alt="Nhance Logo" width="100" style="margin-top:10px;">
|
<img src="{{LOGO_PATH}}" alt="Nhance Logo" width="100" style="margin-top:10px;">
|
||||||
';
|
';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 14. Extract subject template to separate method
|
// 14. Extract subject template to separate method
|
||||||
private function getSubjectTemplate($lead_data)
|
private function getSubjectTemplate($lead_data)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user