Don't miss out Virtual Happy Hour this Friday (April 26).
Try our conversational search powered by Generative AI!
AI OnAI Off
Don't miss out Virtual Happy Hour this Friday (April 26).
Try asking this in the EPiServer Commerce forum.
Also it appears you're working with the CTP17 version which should be discussed in the TAP forums instead of the open forums.
Hi whenever i am trying to add cart . I am getting following error.
Error:
Object reference not set to an instance of an object.
public Entry Entry { get; set; }
public Func<Entry, bool> FilterAction { get; set; }
protected void Page_Load(object sender, EventArgs e)
{
// getcart();
}
protected void btnBuy_Click(object sender, EventArgs e)
{
CartHelper test = new CartHelper(Cart.DefaultName);
if (Entry != null)
{
Entry entry = Entry;
if (FilterAction != null)
{
entry = Entry.Entries.Entry.FirstOrDefault(FilterAction);
test.AddEntry(entry);
}
}
}
Stack Trace: