AbleCommerce Forums
»
AbleCommerce
»
AbleCommerce 9 Bug Reports
»
9.0.7 NewUserAccountCreated event firing wrong StoreEvent
Rank: Advanced Member
Groups: HelpDesk, Developers Joined: 11/9/2018(UTC) Posts: 564
Thanks: 122 times Was thanked: 26 time(s) in 25 post(s)
|
EmailProcessor is being told to fire the wrong store event email trigger with this event Code:
public void NewUserAccountCreated(object o, UserEventArgs e)
{
User user = e.User;
Hashtable parameters = new Hashtable();
parameters["store"] = AbleContext.Current.Store;
parameters["customer"] = user;
EmailProcessor.ProcessEmails(StoreEvent.ProductUpdated, parameters);
}
|
|
|
|
Rank: Advanced Member
Groups: System, Administrators, Developers, Registered, HelpDesk Joined: 10/29/2018(UTC) Posts: 471
Thanks: 4 times Was thanked: 34 time(s) in 33 post(s)
|
Hi Joe,
So the Product Updated Store event is being called when a new user account is created?
I'll get it reported...
|
Thanks for your support!
Katie Secure eCommerce Software and Hosting |
|
|
|
Rank: Advanced Member
Groups: System, Administrators, Developers, Registered, HelpDesk Joined: 10/29/2018(UTC) Posts: 471
Thanks: 4 times Was thanked: 34 time(s) in 33 post(s)
|
Hi Joe,
So the Product Updated Store event is being called when a new user account is created?
I'll get it reported...
|
Thanks for your support!
Katie Secure eCommerce Software and Hosting |
|
|
|
Rank: Advanced Member
Groups: HelpDesk, Developers Joined: 11/9/2018(UTC) Posts: 564
Thanks: 122 times Was thanked: 26 time(s) in 25 post(s)
|
|
|
|
|
Rank: Advanced Member
Groups: Authorized User, Developers Joined: 2/17/2019(UTC) Posts: 909
Thanks: 3 times Was thanked: 15 time(s) in 15 post(s)
|
Kudos to Joe for finding this, just to make sure that my code change is proper, what exactly should the last line be?
Thanks -Ray
|
|
|
|
Rank: Advanced Member
Groups: System, Administrators, Developers, Registered, HelpDesk Joined: 10/29/2018(UTC) Posts: 471
Thanks: 4 times Was thanked: 34 time(s) in 33 post(s)
|
Hello Ray,
There isn't an email template for a new user account, so I'm guessing that the code was part of a copy and never implemented. |
Thanks for your support!
Katie Secure eCommerce Software and Hosting |
|
|
|
Rank: Advanced Member
Groups: Authorized User, Developers Joined: 2/17/2019(UTC) Posts: 909
Thanks: 3 times Was thanked: 15 time(s) in 15 post(s)
|
Hi Katie,
This is true, there is no default new user account e-mail, but there is a trigger for a new user. I'm assuming when that trigger is set to a new email template and executes, it will run the function for a new user but instead try to do a product update e-mail send.
So, I do believe my question is still valid.
Thanks
|
|
|
|
Rank: Advanced Member
Groups: System, Administrators, Developers, Registered, HelpDesk Joined: 10/29/2018(UTC) Posts: 471
Thanks: 4 times Was thanked: 34 time(s) in 33 post(s)
|
As far as I know, we don't have an email for product updated either. I believe this code needs to be removed or commented out until a new email template can be created for the new user event. |
Thanks for your support!
Katie Secure eCommerce Software and Hosting |
|
|
|
Rank: Advanced Member
Groups: Authorized User, Developers Joined: 2/17/2019(UTC) Posts: 909
Thanks: 3 times Was thanked: 15 time(s) in 15 post(s)
|
It's funny that Joe mentioned this because we were looking at this about a month ago.
Keep in mind that we have the ability as a user to create e-mail templates. I am going to assume, and please correct me if I'm wrong, or you'll need to check with support, that because there is already a trigger in place, all we need to do is have the function point to the proper email template.
For us, it would be nice to send the user a new e-mail once an account is created to welcome them on board, if the above requires additional coding beyond modifying the function to point to the proper e-mail, then this is something that should be reviewed and implemented for the next update.
Please reach out to support and let me know if it's as simple as just pointing the function to the proper e-mail?
Many thanks and happy holidays. -Ray
|
|
|
|
Rank: Advanced Member
Groups: System, Administrators, Developers, Registered, HelpDesk Joined: 10/29/2018(UTC) Posts: 471
Thanks: 4 times Was thanked: 34 time(s) in 33 post(s)
|
I searched for the issue report where this was added, and it was something we needed for the Zapier integration. |
Thanks for your support!
Katie Secure eCommerce Software and Hosting |
|
|
|
Rank: Advanced Member
Groups: Authorized User, Developers Joined: 2/17/2019(UTC) Posts: 909
Thanks: 3 times Was thanked: 15 time(s) in 15 post(s)
|
Zapier, how many people are actually using this integration?
Either way the function points to the wrong e-mail template, and if the trigger for a new user points to this function then obviously it won't work at all. Would like to know from support if the trigger points to this function, and all that's necessary is to supply the proper email template.
Thanks
|
|
|
|
Rank: Advanced Member
Groups: System, Administrators, Developers, Registered, HelpDesk Joined: 10/29/2018(UTC) Posts: 471
Thanks: 4 times Was thanked: 34 time(s) in 33 post(s)
|
We will discuss the issue report and decide whether to create a new email template or remove the code.
Sorry, but I don't have the information on Zapier users. |
Thanks for your support!
Katie Secure eCommerce Software and Hosting |
|
|
|
Rank: Member
Groups: Authorized User, Developers Joined: 11/12/2018(UTC) Posts: 25
Thanks: 1 times Was thanked: 4 time(s) in 3 post(s)
|
I'm confused why you would need to remove the code if there is no email template. I think what Ray is suggesting is that the code be changed to fire the correct event, so the merchant can create an email template if they want to and "wire" it to that event.
|
|
|
|
Rank: Advanced Member
Groups: Authorized User, Developers Joined: 2/17/2019(UTC) Posts: 909
Thanks: 3 times Was thanked: 15 time(s) in 15 post(s)
|
Thanks, Jay,
Exactly what I was suggesting, as we further enhance our site, one of the things that we wish to implement is a welcome e-mail to a new user. So, this is crucial for us. I will play with this portion later this month and report my findings.
I hope the built-in trigger for this is working?
-Ray
|
|
|
|
Rank: Advanced Member
Groups: Administrators, Developers, Registered, HelpDesk, Authorized User, Admin, System Joined: 10/11/2018(UTC) Posts: 110
Thanks: 19 times Was thanked: 18 time(s) in 18 post(s)
|
Creating/attaching a new email template and updating the code to use the correct email template is working. The line of code needs to be updated from Code:EmailProcessor.ProcessEmails(StoreEvent.ProductUpdated, parameters);
to Code:EmailProcessor.ProcessEmails(StoreEvent.NewUserAccountCreated, parameters);
|
|
|
|
AbleCommerce Forums
»
AbleCommerce
»
AbleCommerce 9 Bug Reports
»
9.0.7 NewUserAccountCreated event firing wrong StoreEvent
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The AbleCommerce Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close