create account after first order, then add order to order history
I have added a button to the checkout success page, to enable a customer, who doesn't yet have an account, to create one, using their name and billing details from the latest transaction.
However, at the point the order was placed, the customer had no account details, so the order wasn't associated with them, therefore will not appear in their order history.
My thought was, store the session_id in the form to be posted with the other details, so I can update the orders table after the new account is created. The form is then populated, just before my session is killed.
However, though my other form fields are successfully posted to my registration page, the session id isn't.
all i am doing is a simple echo $_POST['fieldname']