AbleCommerce Forums
»
AbleCommerce
»
General Questions
»
Accessing order/basket items during CheckingOut event?
Rank: Advanced Member
Groups: Authorized User, Developers Joined: 5/30/2020(UTC) Posts: 125
Thanks: 14 times Was thanked: 3 time(s) in 3 post(s)
|
How are we supposed to access the order/basket details with the new CheckingOut event? The CheckingOutEventArgs include properties for Payment (which can be null) and Cancel. Shouldn't there be a reference to the basket, or basket id, so we can access details about the potential order (Billing/Shipping/Order Contents/etc)?
I tried doing e.Payment.Order.Items, but as expected, Order is null until CheckedOut.
|
|
|
|
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)
|
Quote:How are we supposed to access the order/basket details with the new CheckingOut event? Currently, you can't access the basket details using the CheckingOut event. You can get the basket details etc. from the current user context. That is; Code:var basket = AbleContext.Current.User.Basket;
Hope this helps!
|
1 user thanked nadeem for this useful post.
|
|
|
Rank: Advanced Member
Groups: Authorized User, Developers Joined: 5/30/2020(UTC) Posts: 125
Thanks: 14 times Was thanked: 3 time(s) in 3 post(s)
|
Thank you, that makes sense! With the transition to dependency injection I forget about the static AbleContext instances.
|
|
|
|
AbleCommerce Forums
»
AbleCommerce
»
General Questions
»
Accessing order/basket items during CheckingOut event?
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