Currently, the checkout form is implemented as a multistep form using a single form ID. Damien's proposal in conjunction with defining checkout pages via hook_commerce_checkout_pane_info() is to rework this so there's a unique form ID per page. We can use the same form builder function, but the ID will differ and the URL used to access a specific page will differ with automatic redirection to the proper page based on the status of an order. This will also require adding an order state and status for the various checkout pages and making sure they get updated as the order proceeds through checkout. I'll open a separate issue to address reverting an order from a checkout order to a shopping cart order.

Comments

rszrama’s picture

We'll need to move the checkout router to the cart module as well.

rszrama’s picture

Things to consider:

  1. Proper access control so users don't guess an order ID and checkout someone else's order.
  2. Need extra meta data for checkout pages to restrict form submissions (i.e. on the complete page).
  3. commerce_checkout_pages() should skip empty pages when determining prev_page and next_page.
  4. Buttons for moving through the form can now include the page's name (i.e. "Proceed to payment" instead of just "Continue").
rszrama’s picture

Implemented #2 with $checkout_page->buttons boolean. Forgot to tag this issue in the commit, but it's part of http://github.com/rszrama/drupalcommerce/commit/4e7ba9381dfbf94cc7d79ecf....

rszrama’s picture

#3 taken care of here: http://github.com/rszrama/drupalcommerce/commit/30c6da5b96bfc74274115e67...

I hardcoded an exception for the Completion page for now, though I suppose we'll need to plop an immovable completion message pane there eventually.

rszrama’s picture

#1 was just committed with a new function, commerce_checkout_access() in commerce_checkout.module.

http://github.com/rszrama/drupalcommerce/commit/b5262ca606de66ad51d0f0b5...

rszrama’s picture

Status: Active » Fixed

And #4 is going to be split out into its own feature request issue, as it's hardly a requirement for the form to work. : )

Done!

Status: Fixed » Closed (fixed)
Issue tags: -dcsprint3

Automatically closed -- issue fixed for 2 weeks with no activity.