Hi Lucas,
The Order custom data can by displayed using either of these macros:
{% Order.OrderCustomData.State |(identity)GlobalAdministrator%} in transformation Order_ContentTable.
The ContentTable is created using method CreateContentTableInternal, and each item row filled using method CreateContentRowInternal in the ShoppingCartInfoProvider. Using Custom Info Provider, you can override the methods like this, to define and add a value for any custom column:
/// <summary>
/// Creates an empty shopping cart content table.
/// </summary>
protected override DataTable CreateContentTableInternal()
{
DataTable dt = base.CreateContentTableInternal()
dt.Columns.Add(new DataColumn("CustomState", typeof(string)));
return dt;
}
/// <summary>
/// Creates one row of the content table with the data which are retrieved from the specified shopping cart item.
/// </summary>
/// <param name="item">Shopping cart item</param>
/// <param name="table">Table from which the content row is created</param>
protected override DataRow CreateContentRowInternal(ShoppingCartItemInfo item, DataTable table)
{
DataRow row = base.CreateContentRowInternal(item, table);
row["CustomState"] = item.CartItemCustomData.State;
return row;
}
Note the use of CartItemCustomData instead of OrderItemCustomData. This ContentTable is shared between the invoice and the Shopping Cart content dialogue, so doing this will also allow you to read this value in the shopping cart.