Does anyone know if it's possible to allow a user account to create an account after they have completed their order and then assign that order to their newly created account?


2 Answers 2


You'd have to make an extension upon member registration. If you're using the native EE registration the hook would be member_member_register:

public function member_member_register($data, $member_id)

  if ($order_id = $this->EE->cartthrob->cart->order('order_id'))
    $this->EE->db->update('channel_titles', array('author_id' => $member_id), array('entry_id' => $order_id));
  • Hey Rob, thanks for the reply. Just by happen thought of logging in here. Not sure why there's never any notifications on here. I have sent a few support requests over the past few weeks asking for some help with this but not sure if they got through. :/ Would this be relatively easy for you guys to write for us? We're also using Profile:Edit. Apr 5, 2013 at 14:51

Yes it is.

On your {exp:cartthrob:checkout_form} just add create_user="yes".

Make sure you map the appropriate fields in the Cartthrob backend.

You can read more about members in Cartthrob on their docs. http://cartthrob.com/docs/backend/members/index.html

  • Thanks Jason. I think I'd need it to work inside the {exp:cartthrob:submitted_order_info} tag though on the "thank you for your order" page. :/ Mar 4, 2013 at 13:18
  • Why? The checkout form will process the order, create the member and then take you - as normal - to the 'thank you' page. Mar 4, 2013 at 13:19
  • The process that we're after though is the user completes the checkout as a guest, but afterwards is asked "why not create an account" and then for the order detail to be added to the user's new account, rather than creating the account during the checkout form. Mar 4, 2013 at 13:33
  • You could build that option into the checkout form. Put a <label><input type="checkbox" name="create_user" value="yes" /> Create a user account</label> in your checkout form and get rid of the create_user="yes" parameter. To do exactly what you are wanting, you may need to build something custom. Mar 4, 2013 at 13:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.