I've been having an issue getting items in the basket to persist when a member user signs in.
If I add items to the basket as an anonymous user and then sign in as a member, the basket is then empty.
I spent a while digging through the code and debugging and think I've tracked down the problem.
There is code to detect when a member signs in and convert the basket from anonymous to the signed in member, but it fails.
In the BasketConversionByCombiningAnonymousBasket class in Merchello.Web there's a procedure called Merge which contains a line to add items from the anonymous basket to the customer basket:
This fails when it tries to enumerate the items using AsLineItemOf.
The problem seems to be passing the type IItemCacheLineItem, which is an interface, as the code then tries to use ActivatorHelper to create a new instance of IItemCacheLineItem, but as that's an interface it fails.
I think it should be passing type ItemCacheLineItem instead of interface IItemCacheLineItem.
I've had a play about and that does seem to fix the problem, so I was wondering if anybody else has had any experience with this?
I have the same issue as you. I had an issue with my Merchello installation so there was the possibility it was an issue purely on my end, however, if you're experiencing it too it seems like an actual bug. Desperately need a resolution to this as all customers have to sign in / register in my store.
Anonymous Basket -> Signed in member... Basket Empty
I've been having an issue getting items in the basket to persist when a member user signs in.
If I add items to the basket as an anonymous user and then sign in as a member, the basket is then empty.
I spent a while digging through the code and debugging and think I've tracked down the problem.
There is code to detect when a member signs in and convert the basket from anonymous to the signed in member, but it fails.
In the BasketConversionByCombiningAnonymousBasket class in Merchello.Web there's a procedure called Merge which contains a line to add items from the anonymous basket to the customer basket:
This fails when it tries to enumerate the items using AsLineItemOf.
The problem seems to be passing the type IItemCacheLineItem, which is an interface, as the code then tries to use ActivatorHelper to create a new instance of IItemCacheLineItem, but as that's an interface it fails.
I think it should be passing type ItemCacheLineItem instead of interface IItemCacheLineItem.
I've had a play about and that does seem to fix the problem, so I was wondering if anybody else has had any experience with this?
James
Yup, see my last post in this thread http://our.umbraco.org/projects/collaboration/merchello/merchello/59972-Basket-is-empty-after-restart
I have the same issue as you. I had an issue with my Merchello installation so there was the possibility it was an issue purely on my end, however, if you're experiencing it too it seems like an actual bug. Desperately need a resolution to this as all customers have to sign in / register in my store.
@James - you are exactly right. We need to change this to an ItemCacheLineItem instead of an interface. I'll get that updated.
Posted the issue here http://issues.merchello.com/youtrack/issue/M-559
is working on a reply...