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
sweeperqb  
#1 Posted : Monday, May 23, 2022 12:14:15 PM(UTC)
sweeperqb

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.

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

nadeem  
#2 Posted : Tuesday, May 24, 2022 7:02:43 AM(UTC)
nadeem

Rank: Advanced Member

Groups: Administrators, Developers, Registered, HelpDesk, Authorized User, Admin, System
Joined: 10/11/2018(UTC)
Posts: 109

Thanks: 17 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!
thanks 1 user thanked nadeem for this useful post.
charles25686713 on 12/8/2023(UTC)
sweeperqb  
#3 Posted : Tuesday, May 24, 2022 8:18:40 AM(UTC)
sweeperqb

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.
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.