It looks like you have your Store cart summary and store cart details server behaviors set with a trigger "before page load", but the inserts refer to posted form values.
Update the two server behaviors to use "any form post" as the trigger instead... but that isn't the problem.
In order to find out your actual error I turned debug mode on in the queryobj.php file. That shows the true error instead of the general error when an action fails. The real error is:
DELETE command denied to user 'xxxxxxx'@'localhost' for table 'order_detail'
This means that your database user doesn't have the correct permissions to allow a delete from the order_detail table. You can fix the problem by going into the database and updating the user permissions to allow delete on that table.