Okay I am trying to run a loop through the DataTable, the ShoppingCart's current content:
The first function is how I add a new column to the table. The 2nd is how I am trying to loop over all the items, and then simply put in 0 in the new column which I added (as a sort of primary test to see if it's actually working).
protected override DataTable CreateContentTableInternal()
{
DataTable dt = base.CreateContentTableInternal();
dt.Columns.Add(new DataColumn("CustomItemPrice", typeof(double)));
return dt;
}
protected override DataTable EvaluateContentInternal(ShoppingCartInfo cart)
{
cart = ECommerceContext.CurrentShoppingCart;
foreach (DataRow row in cart.ContentTable.Rows)
{
row["CustomItemPrice"] = 0;
}
return cart.ContentTable;
}
Unfortunately this results in either a StackOverflow exception, or I simply cannot override the method for some reason. If I change the method from being void to having a return type, I simply cannot override the method at all.