I need to know how the drupal Commerce review page is being created and where the submit handler is which precedes that page. I have added a couple of fields which aren't being picked up in the panes, and I want to debug in the handler (or even a review page tpl file). Where can I find this? I have looking though the code and havn't found the answer.
All checkout page forms are built using the checkout pane info David Thomas indicated through the function commerce_checkout_form() in commerce_checkout.pages.inc. The validate handler does double duty for the checkout form, validating and actually submitting data on a pane by pane basis to capture valid data as soon as possible. This function is aptly named commerce_checkout_form_validate(). Your best bet will be to log debug messages using watchdog instead of displaying them on the screen via drupal_set_message(), because we do some status message processing in there to put messages inline with the panes that generated them - that can make it hard to force a debug message to show when you expect it.
If you want to add checkout panes to the review process you can use
review: boolean indicating whether or not the pane should be included in the review checkout pane; defaults to TRUE
callbacks: an array of callback function names for the various types of callback required for all the checkout pane operations, arguments per callback in parentheses: ....
review($form, $form_state, $checkout_pane, $order): returns data used in the construction of the Review checkout pane
If you want to alter existing checkout panes, e.g the form or the content on the review page, you can use
and adjust the
review property there.