AbleCommerce Forums
»
AbleCommerce
»
General Questions
»
9.0.4 new CheckoutScope() looks interesting
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?
|
|
|
|
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)
|
|
|
|
|
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.
|
|
|
|
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.
|
1 user thanked shaharyar for this useful post.
|
|
|
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.
|
|
|
|
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.
|
1 user thanked shaharyar for this useful post.
|
|
|
AbleCommerce Forums
»
AbleCommerce
»
General Questions
»
9.0.4 new CheckoutScope() looks interesting
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