When I try to send email to customers in the Admin control panel under Sales/Mail, I always get an error message "E-Mail Message required!" even though the message input field is not blank. However, the "contact us" contact form works fine. Order notification has no problem as well. Could anyone help me to fix this issue? I am using Opencart 1.5.5.1. Thanks!
Hi,
The Opencart guys have put this fix in the latest GIT respository.
The issue is that the text from the Message editor pane is not being properly copied to the message variable in the browser (inside the javascript "send(url)" function in the contact.tpl file) before it is being sent to the server, so the server thinks the user did not enter anything in the editor pan.
You can try this:
1. Open file "contact.tpl" in the "admin\view\template\sale" folder
2. Go to line 244, you'll see the line:
and replace with:
3. Save the file and test.
This will copy the data entered in the message edit panel and will send it to the server.
The Opencart guys have put this fix in the latest GIT respository.
The issue is that the text from the Message editor pane is not being properly copied to the message variable in the browser (inside the javascript "send(url)" function in the contact.tpl file) before it is being sent to the server, so the server thinks the user did not enter anything in the editor pan.
You can try this:
1. Open file "contact.tpl" in the "admin\view\template\sale" folder
2. Go to line 244, you'll see the line:
Code: Select all
$('textarea[name=\'message\']').html($('textarea[name=\'message\']').val());
Code: Select all
$('textarea[name=\'message\']').html(CKEDITOR.instances.message.getData());
This will copy the data entered in the message edit panel and will send it to the server.
That code replacement seems to have made the error message go away, but still no email is sent. I was trying to send it to "product" as opposed to "newsletter" or "customer" so that only I receive the email. I'm using 1.5.5.1
Thanks!
Thanks!
Great help
Replacing the code did the trick for me
Replacing the code did the trick for me
Buildng Party Supplies websites
http://www.partystuffonline.co.uk
Hi cheepnis,
I see one reason why this is not working when setting it to product. Looks like the Opencart guys replaced the wrong SQL statement in admin/model/sale/order.php (the part that "getTotalEmailsByProductsOrdered").
In admin/model/sale/Order.php Looking at version 1.5.5.1 of the oreder.php file, I think they were trying to update line 758, but accidentally overwrote line 770.
Note: This is also not in the latest version of the Opencart code in the GIT repository, so Opencart folks, please kindly fix this issue when you get a chance. Thanks.
So, try this:
1. Open: admin/model/sale/order.php
2. Goto line: 770 (assuming version 1.5.5.1 of Opencart)
3.
Replace:
with
4. Give it another try.
Also, of course, make sure you have customers who have ordered the products specified, otherwise no emails will be sent.
Hope this helps.
Thanks.
I see one reason why this is not working when setting it to product. Looks like the Opencart guys replaced the wrong SQL statement in admin/model/sale/order.php (the part that "getTotalEmailsByProductsOrdered").
In admin/model/sale/Order.php Looking at version 1.5.5.1 of the oreder.php file, I think they were trying to update line 758, but accidentally overwrote line 770.
Note: This is also not in the latest version of the Opencart code in the GIT repository, so Opencart folks, please kindly fix this issue when you get a chance. Thanks.
So, try this:
1. Open: admin/model/sale/order.php
2. Goto line: 770 (assuming version 1.5.5.1 of Opencart)
3.
Replace:
Code: Select all
$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);
with
Code: Select all
$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'");
Also, of course, make sure you have customers who have ordered the products specified, otherwise no emails will be sent.
Hope this helps.
Thanks.
Last edited by byocode on Sat Feb 23, 2013 2:42 am, edited 3 times in total.
Thanks Byocode, that did the trick!
BTW, you referenced the file path as admin/MODULE/sale/order.php but I think you meant admin/MODEL/sale/order.php
BTW, you referenced the file path as admin/MODULE/sale/order.php but I think you meant admin/MODEL/sale/order.php
I changed the line 244, but nothing happens when i click Submit then? :/
Helppp!!!
The errors gone though
Helppp!!!
The errors gone though
1. Open file "contact.tpl" in the "admin\view\template\sale" folder
2. Go to line 244
Worked for me - haven't tested the product email yet...
2. Go to line 244
Worked for me - haven't tested the product email yet...
here is the quick vqmod fix for this
Guntis
Partneris.lv - opencart web site development and support
Who is online
Users browsing this forum: No registered users and 47 guests