3

When I have a form submitting to store on a purchase, can I set it so that the account that is created holds the correct member group information? I would like to set someone to pending status. This is my form, can I set it so they are assigned to group 10?

{exp:store:checkout form_class="form-horizontal" register_member="yes" return="shop/order/ORDER_HASH"'}

So something like this:

{exp:store:checkout form_class="form-horizontal" register_member="yes" return="shop/order/ORDER_HASH" group_id='10'}

Or will I need to have them fill this information in post-this form? If they don't have an account, does the form create a password for them or does that need to be included?

1 Answer 1

3

Store will create a member in the member group you have specified in Member > Preferences which by default is set to "Members" or Group ID 5 unless you are requiring "manual activation" or "self activation by email" which would place the member in the pending group until they are activated then they will be moved to the default group. Store does not have a tag that would allow you to specify which member group they are assigned to at the template level. You would need to write an extension to allow something like this.

The allow a member to create an account you will need to use either register_member="" in the checkout tag or you can optionally allow a user to select a checkbox by adding {field:register_member} in your checkout template. Using the {field:register_member} and a bit of javascript you can show/hide the member fields that need to be collected. Store will use the order_email to create the member and you will only need to have password and password_confirm to actually create a member but you can also use username and screen_name both of which will default to the order_email if left blank or not included in the form. In addition if you have gone to Store > Settings > Member Fields and mapped any member fields those to will be transferred over to the members account after the order is completed.

Full documentation is available here.

Your Answer

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

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