From f802377fe9509d1908e785bc04df6ee7e6ee3682 Mon Sep 17 00:00:00 2001 From: VE10-Sanjeev Date: Thu, 25 Jan 2024 14:27:57 +0530 Subject: [PATCH] Notification : ps --- app/Controllers/Notifications.php | 7 ++++++- app/Views/noifications_acknowlegdement.php | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/app/Controllers/Notifications.php b/app/Controllers/Notifications.php index f00f0251..b2502707 100755 --- a/app/Controllers/Notifications.php +++ b/app/Controllers/Notifications.php @@ -642,14 +642,16 @@ class Notifications extends BaseController { $this->logger->info("No Auto Scheduled Notification in DB,exiting...!"); $this->logger->info("Auto Scheduled Notification Ends"); + echo "No Scheduled Data Founded"."
"; exit(); } - + // echo "Notification campaign Result Array in count = ".count($notification_campaign_result)."
"; //looping multiple notification campaign if(count($notification_campaign_result)) { foreach($notification_campaign_result as $index => $single_campaign) { + echo "Notification Campaign Name = ".$single_campaign['campaign_name']."
"; #step 2 get template details $template = $this->getTemplateDetails($single_campaign['template_id']); $this->logger->info("Auto Scheduled Template Details TID = ".$single_campaign['template_id']); @@ -707,6 +709,7 @@ class Notifications extends BaseController $params->number = (int)'91' . $customer['mobile_no']; $whatsapp_reponse = $notification->sendWhatsAppMessage($url, "POST", $params); $whatsapp_reponse_msg = strtolower(gettype($whatsapp_reponse)) == "string" ? $whatsapp_reponse : json_encode($whatsapp_reponse['reponse']); + // echo "Whatsapp Response = ".$whatsapp_reponse_msg."
"; $this->logger->info("Auto Scheduled Whatsapp CID = ".$customer['customer_id']." ".$whatsapp_reponse_msg); $history_child_where = ['fkid' => $single_campaign['history_parent_id'],'id' => (int)$history_child_id]; @@ -724,10 +727,12 @@ class Notifications extends BaseController #step 6 update campaign status to 1 $statement = $model->update_notification_campaign_status(['status' => 1],$single_campaign['campaign_id']); + echo "Final Campaign Status = ".$statement."
"; $this->logger->info($statement); #step 7 update history parent status to 1 $history_parent_statement = $model->update_notification_history_parent_status(['status' => 1],$single_campaign['history_parent_id'],$single_campaign['campaign_id']); + echo "Final Acknowlegdement = ".$history_parent_statement."
"; $this->logger->info($history_parent_statement); } diff --git a/app/Views/noifications_acknowlegdement.php b/app/Views/noifications_acknowlegdement.php index 724b5b79..0d780092 100644 --- a/app/Views/noifications_acknowlegdement.php +++ b/app/Views/noifications_acknowlegdement.php @@ -11,7 +11,7 @@ Name Mode - Schedule At (Date) + Start At Sent At Campaign Name Status @@ -35,7 +35,7 @@ - +