stephenmcd/cartridge — pull request #97 by AlexHill (2013-03-19 08:33:31+00:00)
Title: Check session data for checkout step when POST data not present

Currently we just check `POST` for the checkout step before defaulting to `CHECKOUT_STEP_FIRST`. This checks the order form's initial data for a `"step"` entry after checking the `POST` data.

My use case for this is to correctly redirect the user when returning via redirect from an external payment gateway when an error has occurred. Currently, the user is redirected to the checkout url and, lacking any POST data, shown the first checkout step. With this change, their progress through the cart is loaded from the session and they are correctly shown the payment step.