that error is being caused by a trailing space after the closing php block on line 4:
"?> "
see the following thread for more details on the headers already sent error and how to troubleshoot it:
showthread.php?t=19285
maybe try changing the trigger for the store order summary and store or details behaviors to use the Button submit _Order pressed trigger instead of current page submit.