E-Mail Message required Error Solution – Opencart
- Article
- Comment (18)
Hi , those who come across the problem during your sending mail from your admin section. Here i have some suggestions and tried methods to solve your issue. It may help you to solve the problem.
The first foremost aspect is getting form data’s using jQuery is one of the problem, because, in default, jquery gets value of a html textarea. But Here we are using CKDeditor. So just do the following step to get value from CKEditor. open the following file
admin/view/template/sale/contact.tpl
around line no: 244, or 245 . or better find the following code from the contact.tpl
$('textarea[name=\'message\']').html($('textarea[name=\'message\']').val());
and replace with or just add before the line with the following one.
$('textarea[name=\'message\']').html(CKEDITOR.instances.message.getData());
This will make you to send email from your admin mail. If still problem persist to send emails, do one more steps to solve the issue.
open the following file
admin/model/sale/order.php
goto line nor: 770 or just find this line
$query = $this->db->query("SELECT DISTINCT email FROM `" . DB_PREFIX . "order` o LEFT JOIN " . DB_PREFIX . "order_product op ON (o.order_id = op.order_id) WHERE (" . implode(" OR ", $implode) . ") AND o.order_status_id <> '0' LIMIT " . $start . "," . $end);
and replace with
$query = $this->db->query("SELECT COUNT(DISTINCT email) AS total FROM `" . DB_PREFIX . "order` o LEFT JOIN " . DB_PREFIX . "order_product op ON (o.order_id = op.order_id) WHERE (" . implode(" OR ", $implode) . ") AND o.order_status_id <> '0'");
If you have still any problem. comment below,
For Opencart 2.0 please read here.
Excellent stuff Bro, keep up the good work. I really enjoyed reading your posts. Well done!
Perfect solution!
Thanks.
Version 2.0 for opencart still show same problem.
the coding was not same.
unable to fix it .
please help
The bug was decoded. so no problem with opencart 2.0
i use ver. 2.0 and this problem still exists.
I didnt test the version 2. Let me check and get back you.
i use ver. 2.0 and this problem still exists.
please help
sure. i will try it. but i dont have time to test it on real time.
Facing same problem in opencart 2.
ya ya the coding not fix the OC 2…..HELP…
Facing the same issue with opencart 2. Please help.
for version 2.0 add the following to file admin/view/template/marketing/contact.tpl on line 198
Change:
—————————————————————————————————-
function send(url) {
$.ajax({
—————————————————————————————————-
To:
—————————————————————————————————-
function send(url) {
$(‘#content textarea’).val($(‘div.note-editable’).html());
$.ajax({
—————————————————————————————————-
This will update the original textarea from the note editor
Its updated in separate post. Thanks for updating me…
the changes created a separate article just get it from here.
Hello,
I have an opencart 2.0.1 installed, but the mail and notifications are not working. do you have a solution to fix this?
did you try this article for opencart 2.0 Read here..
Thanks for your response. Its not a contact page issue, all notifications aren’t working.
I am not sure, what you trying to ask. Actually many told that the mail has not been sent to the customers. due this error. and this is a solution for the problem.