Post by j0hny » Mon Feb 26, 2018 4:58 pm

Hi,

I have recently upgraded to 3 on one of my customers opencart installations. Everything works fine and I was able to make everything work as the customer is used to, but there is one issue that I'm struggling to solve and the customer is pushing me hard for it (understandably)

The issue is - opencart does not send emails after order checkout or account registration. I don't mean that the server is failing to send the mail (I'm running my own email server and there is no trace of any email being sent in the logs), but that the opencart installation doesn't even get to the code where mail is supposed to be sent. If I use the newsletter form in administration, all the emails are sent and delivered fine without any issues. All other applications on the same server using same PHP and sendmail are working without problems, as was the 2.3 OC installation with exactly same settings.

I tried adding debug code to catalog/controller/mail/order.php, but when completing an order, it doesn't trigger anywhere in this file (meaning that the process probably silently errored or is blocked by some condition earlier). But so far I haven't been able to pinpoint the exact place where the mail controller is called.

I don't know what other useful info I could give - the mail system is set to "Mail", I have tried filling the parameters field with "-f myemail@domaim.com", but as I said, the email doesn't seem to ever leave PHP since there is no trace of any attempt in any log.

Can someone help me with this issue?

Thanks in advance, Johny

Newbie

Posts

Joined
Mon Feb 26, 2018 4:50 pm

Post by straightlight » Tue Feb 27, 2018 6:17 am

Ensure your admin - > extensions - > events page has more than 30 results. Your admin - > systems - > settings - > edit settings - > mail tab - > bottom also needs to be configured.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by procheck » Tue Feb 27, 2018 8:55 am

If the previous post did not help and you are using WHM. Look in WHM: Home »Email »Mail Delivery Reports to see if it shows there. I've had issues with this in Opencart 2 and that at least proves whether Opencart is sending the confirmations or it's a server issue.

New member

Posts

Joined
Tue Jul 23, 2013 9:42 am

Post by j0hny » Wed Feb 28, 2018 4:48 pm

Thanks both of you for help,

first to reply to procheck - no I'm not using any admin panel, the server is my custom Debian based machine and I manage it myself.

to straightlight - my mail tab is configured correctly, with all the notification checkboxes checked and additional email address also provided (needs to be). Only thing not configured on that tab is the SMTP settings, since I want to use the Mail method.

The events page is another thing though and might be the source of the problem. I've got 1 single item in that table (voucher). Could you please elaborate a bit more on what that means? I will meanwhile try to find some docs on events myself.

Thanks a lot!

Newbie

Posts

Joined
Mon Feb 26, 2018 4:50 pm

Post by straightlight » Wed Feb 28, 2018 6:22 pm

The events page is another thing though and might be the source of the problem. I've got 1 single item in that table (voucher). Could you please elaborate a bit more on what that means? I will meanwhile try to find some docs on events myself.
Issue spotted In your PHPMyAdmin - > Opencart database, truncate your oc_event table. Then, from Opencart ZIP file downloaded from opencart.com - > install/opencart.sql file, see the oc_event query where it starts with: insert into `oc_event` and take that entire block. In your PHPMyAdmin - > Opencart database - > SQL tab, execute the query and ensure to replace oc_ prefixes if using another database table prefix name before launching the queries.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by kromatika » Mon Oct 15, 2018 5:55 pm

Hello. Have you solved the problem? Also my send to the administrator the news of new order but does not send the confirmation e-mails or the order to the customer

Newbie

Posts

Joined
Mon Oct 15, 2018 5:52 pm

Post by vigneshl2925 » Mon Oct 29, 2018 4:16 pm

Hi,

When you upgrade opencart from opencart 2 to opencart 3, the table event contains ro records. But then you see the fresh opencart 3 database, event table has 33 records. Just drop event table from latest migrated db and import event table from fresh opencart 3 db to upgraded opencart db. Now it will work.

Also make sure you have configure mail option for register in admin side.

Settings->edit store->mail tab.

Newbie

Posts

Joined
Mon Oct 29, 2018 4:12 pm

Post by pauliakas » Mon Feb 18, 2019 8:26 pm

Worked for me.
Thanks for great tip O0

Newbie

Posts

Joined
Mon Feb 11, 2019 5:40 pm


Post by davidcropley » Tue Mar 12, 2019 9:00 am

straightlight wrote:
Wed Feb 28, 2018 6:22 pm
The events page is another thing though and might be the source of the problem. I've got 1 single item in that table (voucher). Could you please elaborate a bit more on what that means? I will meanwhile try to find some docs on events myself.
Issue spotted In your PHPMyAdmin - > Opencart database, truncate your oc_event table. Then, from Opencart ZIP file downloaded from opencart.com - > install/opencart.sql file, see the oc_event query where it starts with: insert into `oc_event` and take that entire block. In your PHPMyAdmin - > Opencart database - > SQL tab, execute the query and ensure to replace oc_ prefixes if using another database table prefix name before launching the queries.
I found that running this query gave me an error saying that default values were not defined which I thought was odd as I can see them in the sql file. Fortunately, I had a copy of the database after a fresh OC3 install so I exported the oc_event table, imported it into my existing database and then merged it with the event table (yes I'm from the days of having no prefix!). Initially I had a primary key error because of the existing events (which I wanted to keep) so I just edited the primary keys in the oc_event table to have higher values (I started from 31 upwards, and then appended oc_event to event using the SQL command:

Code: Select all

INSERT INTO event SELECT * FROM oc_event;
Problems have since gone and I can send mail using the default Mail setting in settings/mail and order updates initially appear to be working.

Many thanks must go to Straighlight for pointing me in the right direction though!!
::)

New member

Posts

Joined
Thu Jul 12, 2012 2:18 am

Post by cserra0311 » Sat May 18, 2019 9:46 pm

What I did was, I created a new database, uploaded the sql file. Then I went to PHPadmin and copy the data from one table to the other. and now my events page is populated.

Newbie

Posts

Joined
Wed May 15, 2019 10:07 am

Post by straightlight » Sun May 19, 2019 2:58 am

The issue at the time with that OC version was the sort order value as compared to the sort order field was not declared which were causing errors during insertions. This has been rectified on GitHub.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by TG1313 » Mon Mar 09, 2020 5:52 am

Solution suggested by @straightlight (add records to oc_event) worked for me. Thanks much!

Newbie

Posts

Joined
Fri Feb 21, 2020 1:12 pm

Post by emanf » Mon Jan 18, 2021 9:26 am

For me, have the same problem and the solution from @straightlight worked very fine. Thank you very much!

Newbie

Posts

Joined
Mon Mar 18, 2019 2:27 am

Post by vladislav7able » Tue Mar 09, 2021 9:41 pm

straightlight wrote:
Wed Feb 28, 2018 6:22 pm
The events page is another thing though and might be the source of the problem. I've got 1 single item in that table (voucher). Could you please elaborate a bit more on what that means? I will meanwhile try to find some docs on events myself.
Issue spotted In your PHPMyAdmin - > Opencart database, truncate your oc_event table. Then, from Opencart ZIP file downloaded from opencart.com - > install/opencart.sql file, see the oc_event query where it starts with: insert into `oc_event` and take that entire block. In your PHPMyAdmin - > Opencart database - > SQL tab, execute the query and ensure to replace oc_ prefixes if using another database table prefix name before launching the queries.
Dear straightlight, you make my day! Thank you for your post, you save me a lot of time.


Posts

Joined
Tue Mar 09, 2021 9:38 pm

Post by straightlight » Tue Mar 09, 2021 11:48 pm

Glad you all sorted this issue out with the use of Events! :)

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by waldis11 » Wed Sep 07, 2022 7:36 pm

straightlight wrote:
Wed Feb 28, 2018 6:22 pm
The events page is another thing though and might be the source of the problem. I've got 1 single item in that table (voucher). Could you please elaborate a bit more on what that means? I will meanwhile try to find some docs on events myself.
Issue spotted In your PHPMyAdmin - > Opencart database, truncate your oc_event table. Then, from Opencart ZIP file downloaded from opencart.com - > install/opencart.sql file, see the oc_event query where it starts with: insert into `oc_event` and take that entire block. In your PHPMyAdmin - > Opencart database - > SQL tab, execute the query and ensure to replace oc_ prefixes if using another database table prefix name before launching the queries.
I am running OC 3.0.3.8, and most of order conformation emails are not received by customers. I tried to do as written here above, but got an error message :
#1062 - Duplicate entry '1' for key 'PRIMARY'
But in the same time if I compare the values, I have copied from fresh opencart.sql file, I can find all of them in my oc_event database.
Any ideas where to look?

Newbie

Posts

Joined
Wed Sep 07, 2022 6:51 pm

Post by ADD Creative » Thu Sep 08, 2022 12:01 am

waldis11 wrote:
Wed Sep 07, 2022 7:36 pm
I am running OC 3.0.3.8, and most of order conformation emails are not received by customers. I tried to do as written here above, but got an error message :
#1062 - Duplicate entry '1' for key 'PRIMARY'
But in the same time if I compare the values, I have copied from fresh opencart.sql file, I can find all of them in my oc_event database.
Any ideas where to look?
If some of the order confirmation emails are received then it won't be an issue with events. It's more likely they are being rejected as spam. Have you tested them with a online email deliverability checker, such as mail-tester.com?

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom
Who is online

Users browsing this forum: No registered users and 106 guests