Updated the flow of customer message and customer service

This commit is contained in:
vishalsingh.qlo325
2025-02-24 11:08:44 +05:30
parent b13ef0a185
commit b4f03b3917
25 changed files with 553 additions and 289 deletions

View File

@@ -699,7 +699,7 @@ abstract class PaymentModuleCore extends Module
$customer_thread->id_order = (int)$order->id;
$customer_thread->id_lang = (int)$this->context->language->id;
$customer_thread->email = $this->context->customer->email;
$customer_thread->status = 'open';
$customer_thread->status = CustomerThread::QLO_CUSTOMER_THREAD_STATUS_OPEN;
$customer_thread->token = Tools::passwdGen(12);
$customer_thread->add();
@@ -707,7 +707,7 @@ abstract class PaymentModuleCore extends Module
$customer_message->id_customer_thread = $customer_thread->id;
$customer_message->id_employee = 0;
$customer_message->message = $update_message->message;
$customer_message->private = 0;
$customer_message->private = !Tools::getValue('visibility');
if (!$customer_message->add()) {
$this->errors[] = Tools::displayError('An error occurred while saving message');