1) In the orders table, the orderUserID column is set to NULL, change that to 1.
to fix this when an order is placed, open the confirm page and double click on the Store order Summary behavior. Bind the orderUserID column to the UserID session variable.
(in relation to the second problem, while in the eCart Store order summary, make note of the Store As setting)
2) in the order details table, the detailOrderID is set to 0, change that to 1.
to fix this when an order is placed, open the binding panel and expand the session collection, make sure there is a session in the list with the name you noted from the Store Order Summary -> Store As section, if it is not there, click the plus button, select session variable and use the same name from the Store Order Summary -> Store As section.
then double click the eCart Store Order Details behavior. make sure the detailID column is not bound to a value. from the OrderID column select list, select the detailOrderID column, and bind the detailOrderID column to the session created by the Store Order Summary -> Store As section