logo
Welcome to our new AbleCommerce forums. As a guest, you may view the information here. To post to this forum, you must have a registered account with us, either as a new user evaluating AbleCommerce or an existing user of the application. For all questions related to the older version of Gold and earlier, please go to AbleCommerce Gold forum. Please use your AbleCommerce username and password to Login. New Registrations are disabled.

Notification

Icon
Error

Options
Go to last post Go to first unread
Joe Payne2  
#1 Posted : Monday, November 28, 2022 8:09:28 AM(UTC)
Joe Payne2

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);
        }

Wanna join the discussion?! Login to your AbleCommerce Forums forum account. New Registrations are disabled.

Katie S  
#2 Posted : Monday, November 28, 2022 1:02:15 PM(UTC)
Katie S

Rank: Advanced Member

Groups: System, Administrators, Developers, Registered, HelpDesk
Joined: 10/29/2018(UTC)
Posts: 472

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
Katie S  
#3 Posted : Monday, November 28, 2022 1:02:18 PM(UTC)
Katie S

Rank: Advanced Member

Groups: System, Administrators, Developers, Registered, HelpDesk
Joined: 10/29/2018(UTC)
Posts: 472

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
Joe Payne2  
#4 Posted : Monday, November 28, 2022 1:59:26 PM(UTC)
Joe Payne2

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)
Yes ma'am and thank you
ray22901031  
#5 Posted : Tuesday, November 29, 2022 8:13:21 AM(UTC)
ray22901031

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
Katie S  
#6 Posted : Tuesday, November 29, 2022 11:55:07 AM(UTC)
Katie S

Rank: Advanced Member

Groups: System, Administrators, Developers, Registered, HelpDesk
Joined: 10/29/2018(UTC)
Posts: 472

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
ray22901031  
#7 Posted : Tuesday, November 29, 2022 2:15:20 PM(UTC)
ray22901031

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
Katie S  
#8 Posted : Tuesday, November 29, 2022 2:31:31 PM(UTC)
Katie S

Rank: Advanced Member

Groups: System, Administrators, Developers, Registered, HelpDesk
Joined: 10/29/2018(UTC)
Posts: 472

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
ray22901031  
#9 Posted : Tuesday, November 29, 2022 2:38:43 PM(UTC)
ray22901031

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
Katie S  
#10 Posted : Tuesday, November 29, 2022 2:38:55 PM(UTC)
Katie S

Rank: Advanced Member

Groups: System, Administrators, Developers, Registered, HelpDesk
Joined: 10/29/2018(UTC)
Posts: 472

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
ray22901031  
#11 Posted : Tuesday, November 29, 2022 2:41:56 PM(UTC)
ray22901031

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
Katie S  
#12 Posted : Tuesday, November 29, 2022 2:50:47 PM(UTC)
Katie S

Rank: Advanced Member

Groups: System, Administrators, Developers, Registered, HelpDesk
Joined: 10/29/2018(UTC)
Posts: 472

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
Jay  
#13 Posted : Thursday, December 1, 2022 8:49:55 AM(UTC)
Jay

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.
ray22901031  
#14 Posted : Thursday, December 1, 2022 9:16:23 PM(UTC)
ray22901031

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
nadeem  
#15 Posted : Monday, January 2, 2023 9:46:49 AM(UTC)
nadeem

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);
Users browsing this topic
Guest (10)
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.