Dynamicweb.eCommerce.Orders Namespace > Order Class : SaveDebuggingInfos Method |
class MyPage : System.Web.UI.Page { private static void LogEvent(Dynamicweb.eCommerce.Orders.Order order, string message, params object[] @params) { string orderID = null; if (order == null || string.IsNullOrEmpty(order.ID)) { orderID = "<No order>"; } else { orderID = order.ID; } string printedMessage = string.Format("Order {0}: {1}", orderID, string.Format(message, @params)); LogToFile.Log(printedMessage, "/eCom/CartV2/Events", LogToFile.LogType.ManyEntriesPerFile); //Also save debugging info on the order if (order != null) { order.DebuggingInfos.Add(new Dynamicweb.eCommerce.Orders.Order.DebuggingInfo(printedMessage)); order.SaveDebuggingInfos(); } } }
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2