Post by Damsonlee » Mon Feb 04, 2013 8:04 am

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!

Newbie

Posts

Joined
Sun Sep 23, 2012 2:52 am

Post by Damsonlee » Wed Feb 06, 2013 11:15 am

Bump. I appreciate any sorts of help on this issue.

Newbie

Posts

Joined
Sun Sep 23, 2012 2:52 am

Post by tricom » Wed Feb 06, 2013 6:02 pm

I get same error. I use OpenCart 1.5.5.1 with Bootstrap template

Newbie

Posts

Joined
Tue Sep 14, 2010 8:28 pm

Post by Brentvb » Thu Feb 07, 2013 9:32 am

Same problem with version 1.5.5.1
Last edited by Brentvb on Sat Feb 09, 2013 6:19 am, edited 1 time in total.

Newbie

Posts

Joined
Thu Feb 07, 2013 9:31 am

Post by Damsonlee » Fri Feb 08, 2013 6:45 am

I just downgraded to 1.5.4 and it works fine. But then the slideshow on homepage stopped working. So the mail problem is 1.5.5.1 related.

Newbie

Posts

Joined
Sun Sep 23, 2012 2:52 am

Post by doug3515 » Fri Feb 08, 2013 11:54 pm

I am shaving this issues as well and i am using 1.5.5.1

Newbie

Posts

Joined
Tue Sep 27, 2011 9:55 pm

Post by robert55 » Tue Feb 12, 2013 7:28 am

Same error here with 1.5.5.1
And although I see people with the problem, I do not see any solutions!

Newbie

Posts

Joined
Wed Jun 13, 2012 5:36 pm

Post by byocode » Wed Feb 13, 2013 1:31 am

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:

Code: Select all

$('textarea[name=\'message\']').html($('textarea[name=\'message\']').val());
and replace with:

Code: Select all

$('textarea[name=\'message\']').html(CKEDITOR.instances.message.getData());
3. Save the file and test.

This will copy the data entered in the message edit panel and will send it to the server.

Newbie

Posts

Joined
Wed Feb 13, 2013 1:09 am

Post by robert55 » Wed Feb 13, 2013 10:08 am

Now that's what I am talking about! That solved the problem. I can now send newsletters.
Thank you very very much for your help

Newbie

Posts

Joined
Wed Jun 13, 2012 5:36 pm

Post by byocode » Wed Feb 13, 2013 11:32 am

No problem, glad I could help.

Newbie

Posts

Joined
Wed Feb 13, 2013 1:09 am

Post by cheepnis » Fri Feb 15, 2013 3:58 am

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!

http://www.CheesyFlix.com


User avatar
New member

Posts

Joined
Fri Feb 15, 2013 3:56 am

Post by wsrinivas » Mon Feb 18, 2013 8:48 pm

Great help

Replacing the code did the trick for me

Buildng Party Supplies websites
http://www.partystuffonline.co.uk


User avatar
New member

Posts

Joined
Mon Feb 18, 2013 8:46 pm
Location - Milton Keynes, UK

Post by byocode » Thu Feb 21, 2013 3:37 am

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:

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'");
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.
Last edited by byocode on Sat Feb 23, 2013 2:42 am, edited 3 times in total.

Newbie

Posts

Joined
Wed Feb 13, 2013 1:09 am

Post by percell » Fri Feb 22, 2013 7:28 am

Thanks guys, those two fixes worked well.

Percell

User avatar
Newbie

Posts

Joined
Sat Aug 06, 2011 1:10 am
Location - San Franciso Bay Area North

Post by cheepnis » Fri Feb 22, 2013 11:47 pm

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

http://www.CheesyFlix.com


User avatar
New member

Posts

Joined
Fri Feb 15, 2013 3:56 am

Post by byocode » Sat Feb 23, 2013 2:41 am

Hi Cheepnis,

Glad it worked for you.

You're correct, must have had "module" on my mind as I'm writing a few of my own modules at the moment ;) I updated my post above accordingly.

byocode (aka bring your own code)

Newbie

Posts

Joined
Wed Feb 13, 2013 1:09 am

Post by aviatel » Sun Feb 24, 2013 3:12 pm

hi
i have instaled OC 1.5.5.1 and i want to downgrade to 1.5.3.1 or another version. How to do that ? What files i must save ?
thanks !

New member

Posts

Joined
Sun Feb 10, 2013 4:15 pm

Post by reticlesystems » Thu Feb 28, 2013 12:10 am

I changed the line 244, but nothing happens when i click Submit then? :/

Helppp!!!

The errors gone though

New member

Posts

Joined
Tue Dec 25, 2012 10:40 am

Post by Webmaestro » Fri Mar 01, 2013 10:26 am

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...

User avatar
Newbie

Posts

Joined
Thu Feb 28, 2013 2:16 pm

Post by guntis.e » Fri Mar 08, 2013 11:03 pm

here is the quick vqmod fix for this

Guntis
Image Partneris.net


Active Member

Posts

Joined
Fri Jan 28, 2011 4:20 am
Who is online

Users browsing this forum: Google [Bot] and 48 guests