November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Hmm, found no edit button.
Some extra info - checked the database and for anonymous orders there are items in OrderGroup but not the corresponding item in OrderForm. For real orders, both OrderGroup and OrderForm contain info.
Hi Markus,
Can't really tell you why you have anonymous carts, but as you said it doesn't contain any OrderFrom and it's on OrderForm your line items are stored. This explains why it fails, it tries to get the line items but fails as there are none.
So to me it seems like this is not a real cart. It was created but somehow abandoned before any items were added to it. I haven't seen this issue before either, so it might in your code somewhere.
Thanks, again, for your input, Toni :-)
If this isn't normal in a epi commerce site, then our code might be to blame.
Since we only allow authenticated users to add stuff to their basket, maybe a empty order is created for all other visitors (non-authenticated), just surfing around. Wondering if this could be could be connected to a users session in some way - each new user gets a basket, but only the authenticated ones can use it? Have to check our code to see what happens when a new visitor enters the site!
Checked some more of the code - we use this line in quite a few pages/controls to get access to the users cart:
var cartHelper = new Mediachase.Commerce.Website.Helpers.CartHelper(Cart.DefaultName);
And the carthelper creates a chart, if there isn't one for the current user. And if the user is not authenticated, customer Anonymous is used. So we should not call this method unless a user is authenticated, if we don't want anonymous baskets.
var cartHelper = new Mediachase.Commerce.Website.Helpers.CartHelper(Cart.DefaultName);
That is creating a cart even if the user is annoymnous. The actual order form is not created until their a line item added to the cart. You will probably just need to refactor the code in your header which is showing how many items are in the users cart to only run if the request is authtnenticated
Thanks for clariying when the orderform is created, that explains the error message when clicking on an anonumous cart.
Found two user controls that created a cart in the constructor, if the usercontrol was hidden from non-authenticated users. Changed this and hope to see only real carts in the future.
Hi,
on our site only authenticated users can add products to baskets. In commerce manager/Order management we still still see a number of orders belonging to customer Anonymous. When clicking on one of those, I get an error (see details below).
Has anyone else experienced this? Wonder if it is a programming error on our side or if anonymous orders are created by commerce manager at some stage.
Thanks for your input :-)
/ Markus
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentOutOfRangeException: ArgumentOutOfRange_Index Parameter name: index
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace: