FIX_notification
This commit is contained in:
parent
ec455a1202
commit
afb7349ec7
@ -800,19 +800,19 @@ class Notifications extends BaseController
|
|||||||
echo "Notification Campaign Name = ".$single_campaign['campaign_name']."<br>";
|
echo "Notification Campaign Name = ".$single_campaign['campaign_name']."<br>";
|
||||||
#step 2 get template details
|
#step 2 get template details
|
||||||
$template = $this->getTemplateDetails($single_campaign['template_id']);
|
$template = $this->getTemplateDetails($single_campaign['template_id']);
|
||||||
|
$customer_details = $this->getCustomerDetails($single_campaign['group_id']);
|
||||||
$this->logger->error("Auto Scheduled Template Details TID = ".$single_campaign['template_id']);
|
$this->logger->error("Auto Scheduled Template Details TID = ".$single_campaign['template_id']);
|
||||||
if(count($template))
|
if(count($template) && count($customer_details))
|
||||||
{
|
{
|
||||||
#step 2.1
|
|
||||||
$history_parents_data = ['campaign_id' => $single_campaign['campaign_id'],'status' => 0];
|
|
||||||
$history_parent_id = $model->save_notification_history_parents($history_parents_data);
|
|
||||||
$single_campaign['history_parent_id'] = $history_parent_id;
|
|
||||||
|
|
||||||
#step 3 execute the customer group query and return customer details
|
#step 3 execute the customer group query and return customer details
|
||||||
$customer_details = $this->getCustomerDetails($single_campaign['group_id']);
|
|
||||||
$sent_customer_details = [];
|
$sent_customer_details = [];
|
||||||
if(count($customer_details))
|
if(count($customer_details))
|
||||||
{
|
{
|
||||||
|
#step 2.1
|
||||||
|
$history_parents_data = ['campaign_id' => $single_campaign['campaign_id'],'status' => 0];
|
||||||
|
$history_parent_id = $model->save_notification_history_parents($history_parents_data);
|
||||||
|
$single_campaign['history_parent_id'] = $history_parent_id;
|
||||||
|
|
||||||
foreach($customer_details as $customer)
|
foreach($customer_details as $customer)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -861,7 +861,7 @@ class Notifications extends BaseController
|
|||||||
$this->logger->error($history_child_statement);
|
$this->logger->error($history_child_statement);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
if($single_campaign['mode'] == 'Whatsapp')
|
||||||
{
|
{
|
||||||
$params = (object) Null;
|
$params = (object) Null;
|
||||||
$url = SEND_WAAI_URL;
|
$url = SEND_WAAI_URL;
|
||||||
@ -886,22 +886,19 @@ 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."<br>";
|
||||||
|
$this->logger->error($statement);
|
||||||
|
|
||||||
|
#step 7 update history parent status to 1
|
||||||
|
$history_parent_statement = $model->update_notification_history_parent_status(['status' => 1],$history_parent_id,$single_campaign['campaign_id']);
|
||||||
|
echo "Final Acknowlegdement = ".$history_parent_statement."<br>";
|
||||||
|
$this->logger->error($history_parent_statement);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#step 6 update campaign status to 1
|
|
||||||
$statement = $model->update_notification_campaign_status(['status' => 1],$single_campaign['campaign_id']);
|
|
||||||
echo "Final Campaign Status = ".$statement."<br>";
|
|
||||||
$this->logger->error($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."<br>";
|
|
||||||
$this->logger->error($history_parent_statement);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#step 1 get scheduled notification details
|
#step 1 get scheduled notification details
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user