customer service improvement

This commit is contained in:
azhar bhat
2026-01-21 17:17:38 +05:30
parent 1474ec2c61
commit fae6dff86f
13 changed files with 284 additions and 56 deletions

View File

@@ -704,11 +704,11 @@ abstract class PaymentModuleCore extends Module
// Specify order id for message
$old_message = Message::getMessageByCartId((int)$this->context->cart->id);
if ($old_message && !$old_message['private']) {
if ($old_message && $old_message['private']) {
$update_message = new Message((int)$old_message['id_message']);
$update_message->id_order = (int)$order->id;
$update_message->update();
if (Tools::getValue('visibility')) {
// Add this message in the customer thread
$customer_thread = new CustomerThread();
$customer_thread->id_contact = 0;
@@ -726,9 +726,9 @@ abstract class PaymentModuleCore extends Module
$customer_message->id_employee = 0;
$customer_message->message = $update_message->message;
$customer_message->private = !Tools::getValue('visibility');
if (!$customer_message->add()) {
$this->errors[] = Tools::displayError('An error occurred while saving message');
}
}
}