Developer Blog

Order Log Investigation

Lately I've been digging very deep into the order log in Ecommerce in order to investigate some problems in the checkout process. You probably know, that order change the OrderId when upgrading from cart to order, i.e. when moving to the payment step, and when downgrading from order to cart, e.g. when payment is cancelled and the customer returns to Dynamicweb.

It can be a bit overwhealming to get an overview of this in the log viewer in Ecommerce, so I've had so much use of this small script, that I thought I would share it with you. It allows me to filter on the EcomOrderDebuggingInfo table, e.g. by entering the OrderId and get a full list of  the order life cycle. I can also search for errors in the OrderDebuggingInfoMessage field or search within a time range.

select OrderId, * from EcomOrderDebuggingInfo left outer join ecomorders on OrderAutoId = OrderDebuggingInfoOrderAutoId where OrderDebuggingInfoOrderAutoId = (select top 1 OrderDebuggingInfoOrderAutoId from EcomOrderDebuggingInfo ed1 where ed1.OrderDebuggingInfoOrderId = '[Enter Order Id here]') order by OrderDebuggingInfoTime desc

If you experience exception messages in the log, you might be able to get a more elaborate message with stack trace information by looking in the /Files/System/Log/EventView folder for files with the same creation time as the log containing the error.

Comments

 

You must be logged in to comment