Post by anaaqti » Tue Aug 08, 2017 12:08 am

hay ,,

in opencart V 3.0.2.0

the table called : oc_event

Please fix the code to match the new database for OC V. 3.0.2.0

Because when I import your file the attachment creates an "event" table without "co_"

Causing full opencart stops

I am sorry for bad my English

Newbie

Posts

Joined
Sun Aug 14, 2016 10:23 pm

Post by luke213 » Tue Aug 08, 2017 12:22 am

Sorry this isn't my cup of tea or job;) But I will tell ya what is going on, my database is old and now that you mention it most newer installs use the prefix "oc_" for the database mine does not. I can't guarantee but this should work if you're running that prefix. Still backup etc so you're not stuck as mentioned before:

Code: Select all

-- phpMyAdmin SQL Dump
-- version 4.1.14.8
-- http://www.phpmyadmin.net
--
-- Host: db000000000.db.1and1.com
-- Generation Time: Aug 05, 2017 at 06:34 PM
-- Server version: 5.5.55-0+deb7u1-log
-- PHP Version: 5.4.45-0+deb7u9

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Database: `db000000000`
--

-- --------------------------------------------------------

--
-- Table structure for table `oc_event`
--

CREATE TABLE IF NOT EXISTS `event` (
  `event_id` int(11) NOT NULL AUTO_INCREMENT,
  `code` varchar(64) NOT NULL,
  `trigger` text NOT NULL,
  `action` text NOT NULL,
  `status` tinyint(1) NOT NULL,
  `sort_order` int(3) NOT NULL,
  PRIMARY KEY (`event_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=34 ;

--
-- Dumping data for table `oc_event`
--

INSERT INTO `oc_event` (`event_id`, `code`, `trigger`, `action`, `status`, `sort_order`) VALUES
(1, 'activity_customer_add', 'catalog/model/account/customer/addCustomer/after', 'event/activity/addCustomer', 1, 0),
(2, 'activity_customer_edit', 'catalog/model/account/customer/editCustomer/after', 'event/activity/editCustomer', 1, 0),
(3, 'activity_customer_password', 'catalog/model/account/customer/editPassword/after', 'event/activity/editPassword', 1, 0),
(4, 'activity_customer_forgotten', 'catalog/model/account/customer/editCode/after', 'event/activity/forgotten', 1, 0),
(5, 'activity_transaction', 'catalog/model/account/customer/addTransaction/after', 'event/activity/addTransaction', 1, 0),
(6, 'activity_customer_login', 'catalog/model/account/customer/deleteLoginAttempts/after', 'event/activity/login', 1, 0),
(7, 'activity_address_add', 'catalog/model/account/address/addAddress/after', 'event/activity/addAddress', 1, 0),
(8, 'activity_address_edit', 'catalog/model/account/address/editAddress/after', 'event/activity/editAddress', 1, 0),
(9, 'activity_address_delete', 'catalog/model/account/address/deleteAddress/after', 'event/activity/deleteAddress', 1, 0),
(10, 'activity_affiliate_add', 'catalog/model/account/customer/addAffiliate/after', 'event/activity/addAffiliate', 1, 0),
(11, 'activity_affiliate_edit', 'catalog/model/account/customer/editAffiliate/after', 'event/activity/editAffiliate', 1, 0),
(12, 'activity_order_add', 'catalog/model/checkout/order/addOrderHistory/before', 'event/activity/addOrderHistory', 1, 0),
(13, 'activity_return_add', 'catalog/model/account/return/addReturn/after', 'event/activity/addReturn', 1, 0),
(14, 'mail_transaction', 'catalog/model/account/customer/addTransaction/after', 'mail/transaction', 1, 0),
(15, 'mail_forgotten', 'catalog/model/account/customer/editCode/after', 'mail/forgotten', 1, 0),
(16, 'mail_customer_add', 'catalog/model/account/customer/addCustomer/after', 'mail/register', 1, 0),
(17, 'mail_customer_alert', 'catalog/model/account/customer/addCustomer/after', 'mail/register/alert', 1, 0),
(18, 'mail_affiliate_add', 'catalog/model/account/customer/addAffiliate/after', 'mail/affiliate', 1, 0),
(19, 'mail_affiliate_alert', 'catalog/model/account/customer/addAffiliate/after', 'mail/affiliate/alert', 1, 0),
(20, 'mail_voucher', 'catalog/model/checkout/order/addOrderHistory/after', 'extension/total/voucher/send', 1, 0),
(21, 'mail_order_add', 'catalog/model/checkout/order/addOrderHistory/before', 'mail/order', 1, 0),
(22, 'mail_order_alert', 'catalog/model/checkout/order/addOrderHistory/before', 'mail/order/alert', 1, 0),
(23, 'statistics_review_add', 'catalog/model/catalog/review/addReview/after', 'event/statistics/addReview', 1, 0),
(24, 'statistics_return_add', 'catalog/model/account/return/addReturn/after', 'event/statistics/addReturn', 1, 0),
(25, 'statistics_order_history', 'catalog/model/checkout/order/addOrderHistory/after', 'event/statistics/addOrderHistory', 1, 0),
(26, 'admin_mail_affiliate_approve', 'admin/model/customer/customer_approval/approveAffiliate/after', 'mail/affiliate/approve', 1, 0),
(27, 'admin_mail_affiliate_deny', 'admin/model/customer/customer_approval/denyAffiliate/after', 'mail/affiliate/deny', 1, 0),
(28, 'admin_mail_customer_approve', 'admin/model/customer/customer_approval/approveCustomer/after', 'mail/customer/approve', 1, 0),
(29, 'admin_mail_customer_deny', 'admin/model/customer/customer_approval/denyCustomer/after', 'mail/customer/deny', 1, 0),
(30, 'admin_mail_reward', 'admin/model/customer/customer/addReward/after', 'mail/reward', 1, 0),
(31, 'admin_mail_transaction', 'admin/model/customer/customer/addTransaction/after', 'mail/transaction', 1, 0),
(32, 'admin_mail_return', 'admin/model/sale/return/addReturn/after', 'mail/return', 1, 0),
(33, 'admin_mail_forgotten', 'admin/model/user/user/editCode/after', 'mail/forgotten', 1, 0);

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
If that doesn't work you may have change "PRIMARY KEY (`event_id`)" to "PRIMARY KEY (`oc_event_id`)" but I didn't go dig into the database to look if that's the syntax there. I don't have a store running using a database with oc_ prefix so I can't really look at it without installing a fresh store to check. Also you should be able to drop that table you added without the oc prefix and it should take off working, actually now that I think about it you dropped the table previous OC_ table. So try importing this if it doesn't work try changing that code I mentioned since I honestly am not sure if that's oc_event_id or just event_id whichever it is in your database is correct but you could also try both and see which works. Either way if you have trouble I'll try and help but beware I'm busy today since it's a Monday and I'm just doing this to help out other guys so it does take bottom priority compared to my actual work;)

Take care!

Luke

New member

Posts

Joined
Thu Jul 08, 2010 2:35 am


Post by anaaqti » Tue Aug 08, 2017 1:09 am

hello

thanx for your time

When I import it, gave me an error in all the above modifications

but I took table "oc_event" from new fresh Database and imported it on the main database

I tried sending alerts to clients and worked normally

Thanks for your help
Last edited by anaaqti on Tue Aug 08, 2017 1:14 am, edited 1 time in total.

Newbie

Posts

Joined
Sun Aug 14, 2016 10:23 pm

Post by luke213 » Tue Aug 08, 2017 1:11 am

That is absolutely the right way to do it;) I tried apparently and failed to make a file that would import cleanly;)

But others reading this that's another way to do what I did, just basically do an install and pull the event table from it and import it into your old database and you should be good to go;)

Luke

New member

Posts

Joined
Thu Jul 08, 2010 2:35 am


Post by higgyjay » Wed Aug 09, 2017 6:00 pm

Thank you Luke. After hours of trying to fix this I found your post and your 'event' table fix sorted it in 5 minutes.

Like anaaqti I did as your first post said and got a table called 'event' rather than 'oc_event'. To fix it you just click on that table name in the list of table names down the left in PHPMyAdmin. Then at the top click on Operations and under Table Options the first option is 'Rename table to'. I renamed mine to oc_event and that was it. The mail started working immediately - both using the Mail and SMTP settings.

Again thank you Luke. You have saved my sanity!

Jonathan

Newbie

Posts

Joined
Wed Aug 09, 2017 5:53 pm

Post by luke213 » Wed Aug 09, 2017 8:44 pm

It had me questioning my sanity for a while too;) Glad to hear it's sorted for ya;)

Take care

Luke

EDIT Also for guys reading this he's spot on you can just change the name there like mentioned. I'm fairly new to PHPMYADMIN in the past I haven't done much other than actually replacing a database or backup and restore etc. Very seldom have I actually fiddled inside the database for fear of screwing something up. In all my tech years database and programming were the two things I disliked the most, I'm 99% a hardware guy:) But the site sometimes drives me in directions that are outside of my "normal" zone;)

New member

Posts

Joined
Thu Jul 08, 2010 2:35 am


Post by linetrace » Fri Aug 18, 2017 7:15 am

Thank you! This fix worked for me (after renaming the table references in the .sql file to 'oc_event'. I checked the source code in GitHub and it looks like an upgrade script has been added (after the 3.0.2.1 beta, unfortunately) to resolve this issue, so hopefully it'll be a non-issue going forward.

Newbie

Posts

Joined
Sat Aug 05, 2017 4:42 am
Location - Winooski, VT, US

Post by vaughnchill » Thu Sep 14, 2017 11:08 am

Ugh, I was hoping dropping that table worked for me, but unfortunately I'm still in the same boat.

Having an issue with the Order Emails not sending to guest. I am receiving a copy for the admin email, but not for the guest. All other emails are working fine (sign up, order update statuses, etc...).

This really sucks. Such a huge feature that does not work is not good! Any help out there would be great!

Thanks.

Newbie

Posts

Joined
Thu Aug 31, 2017 2:11 pm

Post by so2 » Mon Sep 18, 2017 5:35 am

OMG IF I could find you and hug you!!! I have been going nuts the past few weeks trying to find a solution to this error. I finally have emails and they are working without issue. THANK YOU :D

so2
Newbie

Posts

Joined
Wed Mar 08, 2017 4:37 pm

Post by vaibhav12321 » Sat Jan 06, 2018 7:09 pm

I am using version 3.0.2.0. When user checkout via paypal/cod both buyer and admin didn't get email. In the admin store setting in store tab I add my E-Mail. And in Mail tab checked "Register", "Affiliate", "Orders", " Reviews" for Alert Mail field. But still unable to get email. Please tell me what could be the issue.

Newbie

Posts

Joined
Fri Dec 08, 2017 8:51 pm

Post by straightlight » Sat Jan 06, 2018 10:21 pm

In admin - > extensions - > events page, ensure to see more than 1 event listed. If not, you need to truncate the event table in your Opencart database and to re-insert the values from your install/opencart.sql file located in the downloaded OC Zip file provided by opencart.com .

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 sirenworld » Mon Jan 08, 2018 4:05 am

IT WORKED!!! Thank you!!

Newbie

Posts

Joined
Sun Apr 29, 2012 11:26 am

Post by vaibhav12321 » Mon Jan 08, 2018 7:41 pm

vaibhav12321 wrote:
Sat Jan 06, 2018 7:09 pm
I am using version 3.0.2.0. When user checkout via paypal/cod both buyer and admin didn't get email. In the admin store setting in store tab I add my E-Mail. And in Mail tab checked "Register", "Affiliate", "Orders", " Reviews" for Alert Mail field. But still unable to get email. Please tell me what could be the issue.
User straightlight solve my problem. Your solution works great, that's what I was missing. Thank you very much sir.

Newbie

Posts

Joined
Fri Dec 08, 2017 8:51 pm

Post by Soedesh » Fri Jan 12, 2018 10:13 am

I am also having problems to get any email alert working on my real webshop.
On my (test) webshop it worked (and still works) without any issue.

Without the mail working OC is a useless product and while looking for a solution I found this forum.

However the suggestions posted here until now do not apply to my situation as I started freshly, without importing any (old) database.
What I did notice is that the reply adress of emails send from the working test webshop has the form info@<mydomain>.<com>.
I don't remember putting that information anywhere in the settings of OC, so I think it is a default setting or hard coded (which would be very bad programming, but how much can you expect from a free/open source product like this ;) ).
Now I have created an info@<mydomain>.<com> address on the domain on my real website (which did not exist untill now) to see if that helps.


Meanwhile I checked my "sendmail_path" with phpinfo.php and it shows the correct path.
However I also noticed that the line on top of it shows the "sendmail_from" value, which to my suprise is indeed my info@<mydomain>.<com> address, which confirmes what I already suspected.

OpenCard and/or the PHP Sendmail system are assuming that your domain has a working info@ email address.

This is a bad assumption since a lot of domain owners (me included) do no even create an info@ email address (because they simply prefer another contact mail addres or want to avoid being spammed).

I found a lot of useful information about OC mailing issues on this website, but information regarding the value of the sendmail_from parameter is not even mentioned there:

http://www.pixelfire.com.au/website-des ... -correctly

Newbie

Posts

Joined
Sat Dec 30, 2017 12:06 am

Post by assbach » Wed Jan 24, 2018 3:36 am

I so hoped this would help, but when i checked the events table it looks exactly the same as your SQL patch.
33 rows with this exact data. In the settings > email i only see 4 (register, affiliate, orders, reviews) all checked. :-\
on the page extentions > events i see 33 entries , all active.

Newbie

Posts

Joined
Wed Oct 18, 2017 9:52 pm
Location - Germany

Post by straightlight » Wed Jan 24, 2018 4:32 am

assbach wrote:
Wed Jan 24, 2018 3:36 am
I so hoped this would help, but when i checked the events table it looks exactly the same as your SQL patch.
33 rows with this exact data. In the settings > email i only see 4 (register, affiliate, orders, reviews) all checked. :-\
on the page extentions > events i see 33 entries , all active.
Is your admin - > systems - > settings - > mail tab properly 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 assbach » Fri Jan 26, 2018 7:58 pm

i think so, because all kinds of mails are being sent (new registration i.e.) but no notification mails when a nre order has been placed.

Newbie

Posts

Joined
Wed Oct 18, 2017 9:52 pm
Location - Germany

Post by PatrickG » Wed Feb 28, 2018 7:46 pm

My problem was on a brand new installation, on testing, the 'new customer' registration emails were sent out but no other notifications, and the product sale did not register either. I tried your database changes Luke but unfortunately it broke my installation - thanks for putting in the effort though.

After using Opencart 2 for several years I have now consigned version 3 to the recycle bin.

New member

Posts

Joined
Wed Mar 18, 2015 10:32 pm

Post by elaurijssens » Tue Mar 06, 2018 9:32 pm

I had been staring at this for quite some time. Turns out that I did have an oc_events table, but it was empty... thanks!

Newbie

Posts

Joined
Sun Jan 21, 2018 5:10 am

Post by crewmark » Thu Mar 22, 2018 2:02 pm

Luke you da man!!! O0
That worked a dream and here I was expecting to pull my hair out for at least a week.

Newbie

Posts

Joined
Thu Aug 13, 2015 12:00 pm
Who is online

Users browsing this forum: Amazon [Bot] and 41 guests