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 : Thursday, October 8, 2020 2:50:24 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)
I'm working with the basket id during shopping and checkout. I need it to store a custom value to ac_CustomFields that is entered on /EditBillAddress.

But the basketId is changing during checkout for anonymous checkouts. I suspect the process of converting an anonymous user record to an 'official' user record is generating a new basket object in the data instead of reusing the existing basket object.

So by the time the code reaches the point where the checkout service fires (payment method processing), the basket id is no longer the same as it was prior to /EditBillAddress. Any value persisted to ac_CustomFields prior to /EditBillAddress that is based on the basketId will no longer be found.

This completely breaks any attempt to implement ac_CustomFields as a means to maintain custom field values for the basket object.

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

Naveed Ashraf  
#2 Posted : Friday, October 9, 2020 1:38:13 AM(UTC)
Naveed Ashraf

Rank: Advanced Member

Groups: Admin, Administrators, Developers, Registered, HelpDesk, Authorized User
Joined: 7/31/2019(UTC)
Posts: 77

Was thanked: 8 time(s) in 8 post(s)
When an anonymous user login, the basket instance associated with the anonymous user account is assigned to logged in user account.

However this only happens if there are some items in basket. An empty basket is not transferred on login. So, if the anonymous user have nothing in the basket, on login the basket id will change (actually no new basket is created, but in this scenario the logged in user account retain the old associated basket).

Thanks for your support!
Naveed Ashraf
Ablecommerce.com
Developer Assistance Available
Joe Payne2  
#3 Posted : Friday, October 9, 2020 4:27:45 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)
Yea but I'm not talking about sign-in. I'm talking about an anonymous checkout.

Anonymous checkout creates a new separate user account that is different from the anonymous user account. Then it calls Migrate() to move child data from the old user account to the new user account it just created. This happens in EditBillAddress().

And it is changing the basket ID at that point. I just watched it do it. Which makes me question how ExtendedFields is even usable, since it's just storing stuff to ac_CustomFields based on that ID value. Which has now just changed.


https://www.screencast.com/t/RhplJYLWXu2a
shari  
#4 Posted : Friday, October 23, 2020 7:06:17 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)
Thanks for the video, it helped in understanding the issue.

This is how it is working for now. You brought up a new case for the use of custom fields.
We will look into it if we can further improve this feature.

Thanks
thanks 1 user thanked shaharyar for this useful post.
Joe Payne2 on 10/23/2020(UTC)
Users browsing this topic
Guest (3)
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.