use the eCart Store Order Summary and Store order details behaviors.
from the server behaviors panel, click plus button and select eCart -> Database manipulation.
add the store order summary behavior first.
For the Order ID, select the Primary key column of the orders table, and make note of the "Store As " name. This is the name of a session that will be created with the ID of the record inserted to the orders table.
in the Store order details behavior, set the Order ID to the relational column to the orders table.
Bind that column to the session crated by the store order summary behavior