November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Hi,
The cart is identifed by the current contact id. It looks like when you using AD account, the current user is not set correctly all the time, causing the CurrentContactId to be mapped to "anonymous", then causing your problem.
I would suggest you to check if SecurityContext.Current.CurrentUser to see if it returns correct value all the time.
We have an ongoing US to handle this situation more correctly.
Regards.
/Q
Opps , i just see my post is looks terrible :) but thank you Quan to reply
Current user is correct all the time but problem is Episerver creat new cart to AD user evertime when AD user add item to cart. When i log in to Commerce and check order cart. Same AD user many cart created and every cart have just one item.
401 | wt8873 | 0,00 kr | In Progress | Today, 10:47 AM | |
400 | wt8873 | 0,00 kr | In Progress | Today, 10:47 AM | |
399 | wt8873 | 0,00 kr | In Progress | Today, 10:47 AM | |
398 | wt8873 | 0,00 kr | In Progress | Today, 10:47 AM | |
397 | wt8873 | 0,00 kr | In Progress | Today, 10:47 AM | |
396 | wt8873 | 0,00 kr | In Progress | Today, 10:46 AM | |
395 | wt8873 | 0,00 kr | In Progress | Today, 10:46 AM |
That's strange. Can you make sure that those carts have same name and same market?
/Q
I am sure that cart have the same name because vi config cart name property in start page (multi-site, share database)and all of them have default market.
I guess i know now what the problem is. I dont have AD membership provider in Commerce.
Do you know how to make Active Directory Membership Provider for EPiCommerce ?
Hi Everyone,
How to manage commerce with AD user? when log in with AD user and add cart with this method
public static void Add(string entryCode, decimal quantity)
{
var cart = new CartHelper("name");
Entry entry = CatalogContext.Current.GetCatalogEntry(entryCode);
cart.AddEntry(entry, quantity, false); // here i check cart has right item and GetTotalItemCount() is right
}
but when i count item in cart with this code in another page GetTotalItemCount() is 0
var cart = new CartHelper("name");
return cart.GetTotalItemCount();
Any idea why? i have episerver 7.5 and have AD user in CMS as read only