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 : Tuesday, May 11, 2021 6:27:55 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)
Who's idea was that? That looks really, really useful to use the event engine to deal with pre and post checkout handling. Am I correct?

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

shaharyar  
#2 Posted : Tuesday, May 11, 2021 6:40:46 AM(UTC)
shaharyar

Rank: Advanced Member

Groups: Admin, Developers, Registered, HelpDesk, Authorized User
Joined: 10/5/2018(UTC)
Posts: 704

Thanks: 5 times
Was thanked: 113 time(s) in 112 post(s)
@mazhar added this new feature. You can see the related discussion in this post.

https://www.ablecommerce.../t485-Events-for-plugins
Joe Payne2  
#3 Posted : Tuesday, May 11, 2021 7:17:12 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)
Thanks but I don't have access to that post.
shaharyar  
#4 Posted : Wednesday, May 12, 2021 2:54:37 AM(UTC)
shaharyar

Rank: Advanced Member

Groups: Admin, Developers, Registered, HelpDesk, Authorized User
Joined: 10/5/2018(UTC)
Posts: 704

Thanks: 5 times
Was thanked: 113 time(s) in 112 post(s)
Question:
Quote:
I posted this in the feature requests and I do realize that more store events are coming but I wanted to post here to talk about what other developers have used to get around some of the limitations with plugins.

The basic issue I'm quickly running into is that there are multiple points within the system that are often being addressed with controllers - to override these points you have to add code into the app and recompile which takes away the benefits of a plugin.

The main fix I see in other platforms to this issue is extensive use of hooks or events. So an event is fired every time some logs in & logs out - payment forms checkout / checkout complete...etc

I've had this issue already with multiple plugins trying to add code to the login controller for example - only one plugin wins and the other plugins are ignored and here is another example I'm running into now

CheckoutController -> _CreditCardPaymentForm method

if (checkOut) {

... We usually have multiple extensions that need to add code right here

Right now it seems the only way to do this is to open up the App - change the code directly and recompile but that means for a client installing our 'plugin' they'd have to do this and that's not easy.
The other option my plugin takes this code over and I inject my code but then subsequent plugins that want to inject their code in this same area has to take over the code and then my code will be ignored or we have to be aware of the other plugin and merge our code into a plugin...etc. This is really messy obviously.

So as of now - anytime I have to change code in a AC controller - I really just scrap the idea of a 'plugin' and it just becomes a client custom app change


Answer:
Quote:

We added pre/post checkout events called CheckingOut and CheckedOut in 9.0.4. CheckingOut allows you to write logic before checkout starts and you can even cancel the checkout. The checked out event is fired once checkout is processed and you are notified with checkout status and order that was created.
thanks 1 user thanked shaharyar for this useful post.
Joe Payne2 on 5/12/2021(UTC)
Joe Payne2  
#5 Posted : Wednesday, May 12, 2021 7:35:43 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)
Thank you.

I'm curious how this will work when multiple integrations are in play. Can you 'subscribe' to the CheckingOut event via a new handler, or can you only override it?

Seems like the ability to 'subscribe' to events offers the most flexibility especially when plugins start rolling out.
shaharyar  
#6 Posted : Monday, May 17, 2021 6:36:06 AM(UTC)
shaharyar

Rank: Advanced Member

Groups: Admin, Developers, Registered, HelpDesk, Authorized User
Joined: 10/5/2018(UTC)
Posts: 704

Thanks: 5 times
Was thanked: 113 time(s) in 112 post(s)
Quote:
Can you 'subscribe' to the CheckingOut event via a new handler


Yes, you can subscribe to the CheckingOut event via a new handler without overriding.
thanks 1 user thanked shaharyar for this useful post.
Joe Payne2 on 5/17/2021(UTC)
Users browsing this topic
Guest
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.