Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I built a site that sells membership and the paid membership aka user role is automatically assigned upon checkout. Recently I like to change the auto user role assignment to manual. The concept is to allow the user to select user roles when they are going through the user registration process. I like to break down the membership (paid member) to paid member A and paid member B, they all have the same privileges. The purpose of breaking the membership down is to easily distinction.
Any ideas or suggestions would be appreciated!!
Comments
Comment #1
TR CreditAttribution: TR commentedThere are many ways you could do this depending where in the workflow you want to make the decision and select the role. The easiest is just to have a product attribute for the customer to select which of the two roles he wants. Another way is to ask the user in a checkout pane using the extra checkout panes module or the uc_webform module. You can then change the role based on the selection either in a submit handler or via Rules post-checkout.