It looks like you have the store order summary and detail server behaviors improperly configured. It looks like you are listing the id column in the list of columns to be inserted or updated. You should not be inserting into the id column for either the order or order details table. Instead you should leave this field alone, and only fill on the other fields in your table.
It looks like you are referencing the session id as the details order id. The reference value for the OrderDetailsOrderID should be the session variable that is set with the id for the order from the store order summary server behavior:
You should make sure to backup this page first, then update these server behaviors to be properly referencing the values that will be inserted with them. You will only need to specify the item id in the store order details server behavior, not the summary.