Not so much a bur, or a feature request. The uc_signup does what it needs to do, but doesn't if that makes sense.

It calls and actions anything added to the profile module, however it does not request the fields from the user location (using the location module) or the terms and conditions (from the legal module). If any additional profile modules are requested it doesn't ask for the them when creating the profile, but when attempting to submit the order is flags that these fields are missing and the user cannot continue.

I think this should be a part of the uc_signup in order to fully automate the process.

CommentFileSizeAuthor
#4 uc_signup.module-721046_1.patch2.81 KBjm.federico

Comments

ezra-g’s picture

Title: Does not fully integrate with all registration processes » Include custom fields added to profile form
Version: 6.x-1.0-beta4 » 6.x-1.x-dev

Agreed. Even with the switch to using uc_signup_profile_form() to get the profile form, I believe this will leave out non-core fields.

ezra-g’s picture

I believe the first request for this functionality was #658804: Integration with Profile Checkboxes.

ezra-g’s picture

Title: Include custom fields added to profile form » Include non-core fields added to profile form

Changing title to better describe the contrib modules that add fields.

jm.federico’s picture

StatusFileSize
new2.81 KB

All right

For now here is a patch to allow multiple profile categories. Right now the form will only show the first profile category, that is not desirable.

With this patch all profile groups will be shown, in proper fieldsets.

Now some thoughts:

  • This module doesn't take into account the modifications made to the users forms using hook_user(). This is a problem since custom validations are run after payment is submitted and, when Ubecart creates the users, which forces the user to go back, fix the forms, and go through payment process again. There should be a way to run validation when first filling the forms.
  • An option to fix that problem could be to create a fake user, Drupal will then validate the whole thing, and if it validates we delete the user and continue, problem here is that a lot of emails could be generated by the system as if a real user had been created
  • Other option is to have a user marked as inactive and make all the changes against that user. This way we could avoid potential e-mails sent by the system
  • A last option I can think of is to make invoke hook_user() with $op create and intercept with some token set by uc_signup is found, which lets us know we just want to test the thing. If the token is found we cancel the process, but we then know that everything else validated! Hum, me like this idea!

Right, it is 1.30 am and my brain just died. Plz check the patch and comment back.

Federico

scotwith1t’s picture

Status: Active » Needs review

I'd mark as Tested and Reviewed, but it's just me, so I don't know...seems to work just great though. This should be committed to dev...

jm.federico’s picture

Status: Needs review » Needs work

Keep in mind that my patch is just to support multiple profile categories, not non-core fields. As such this still required work.
I opened a new issue for just profile categories. #919056: Show 'visible in user registration form' fields during uc_signup account creation.

Please review patch there and mark as review and tested if it works for you.

scotwith1t’s picture

Status: Needs work » Closed (duplicate)

patch at #13 on #919056: Show 'visible in user registration form' fields during uc_signup account creation. does both; shows all profile categories and fields marked to be displayed during registration. marking as duplicate.