Seems like it must be an issue with how you are setting the ID in the shopping cart.
This looks like an issue with the data type used with the store cart details in database on the confirm page. I would need to look at it further to tell for sure, but it appears the column before detailItemName, which I imaging is detailItemID is set as a number field but you are trying to insert a text value.