Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 16 additions & 5 deletions contactform.php
Original file line number Diff line number Diff line change
Expand Up @@ -666,11 +666,22 @@ public function sendMessage()
}

if (!count($this->context->controller->errors)) {
$this->context->controller->success[] = $this->trans(
'Your message has been successfully sent to our team.',
[],
'Modules.Contactform.Shop'
);
if (!empty($mailAlreadySend)) {
// The message repeated the last one already on this thread, so nothing was stored and no
// email went out. Reporting it as sent is what makes this look like the form failing in
// silence: the merchant never receives it and the customer is told that it arrived.
$this->context->controller->success[] = $this->trans(
'This message has already been sent to our team.',
[],
'Modules.Contactform.Shop'
);
} else {
$this->context->controller->success[] = $this->trans(
'Your message has been successfully sent to our team.',
[],
'Modules.Contactform.Shop'
);
}
}
}

Expand Down