Notification Exp : ps

This commit is contained in:
VE10-Sanjeev 2023-12-23 17:45:39 +05:30
parent e7c091c157
commit 7550adfcf0

View File

@ -498,8 +498,9 @@ class Notifications extends BaseController
# EXPIRAY_NOTIFY_TEMPLATE_EMAIL
$emailTemplateName = $NotificationModel->getTempName(EXPIRAY_NOTIFY_TEMPLATE_EMAIL);
if (!empty($emailTemplateName)) {
$campaign_id = 1;
# Insertion on History Email Means Campaign ID 1 Hardcoded
$history_parents_data = ['campaign_id' => 1,'status' => 0];
$history_parents_data = ['campaign_id' => $campaign_id,'status' => 0];
$history_parent_id = $NotificationModel->save_notification_history_parents($history_parents_data);
# Step 4: Prepare email content based on the template
@ -547,13 +548,14 @@ class Notifications extends BaseController
# EXPIRAY_NOTIFY_TEMPLATE_WHATSAPP
$whatsappTemplateName = $NotificationModel->getTempName(EXPIRAY_NOTIFY_TEMPLATE_WHATSAPP);
if (!empty($whatsappTemplateName)) {
$campaign_id = 2;
if (empty($userMobileNumber)) {
$history_msg = 'There is no subscriber mobile number';
$this->logger->info($history_msg);
continue;
}
# Insertion on History Whatsapp Means Campaign ID 2 Hardcoded
$history_parents_data = ['campaign_id' => 2,'status' => 0];
$history_parents_data = ['campaign_id' => $campaign_id,'status' => 0];
$history_parent_id = $NotificationModel->save_notification_history_parents($history_parents_data);
# Step 7: Prepare whatsapp content based on the template