We have two products, and want people added to one member group or the other when purchasing. If they purchase both products we want them added to a third member group. Will this be possible with Store?
Sure - you would write an extension that uses the store_order_complete_end hook. You'd then loop through the items in the order and perform your logic as to what member group the customer should get added to in the end.
As Derek mentioned you would need to create an extension to handle the logic of adding the user to a specific member group based upon their purchased items. Store does allow you to add a member to the default member group (per your membership settings) if they register a new account while they are completing checkout.
Member accounts will be created based on the order_email, and the email address must not already be used for a member account. After creating the member account, any existing orders tied to that email address will be assigned to the new member.
From Docs about allowing member registration:
If the create_member = 'yes' option is passed to the form, Charge can create a new member account during payment. The created member will only be created if the user isn't currently logged in. When created the member will be added to the default site member group and immediately logged in. This can be especially useful if you want to create + add a user to a subscription, as the member account will be created first, then immediately added to any subscription as defined in the Charge action settings
As for Charge it does allow you to specify a member group that successful subscriptions members are moved to when they have an active subscription and the member group that they are moved to for a failed subscription or when the subscription expires. Having said that, the last time I looked you would still need to write an extension to handle setting the base member group and then having an alternative member group based upon 2 items in the cart or if the user has purchased one item already then comes back a week later and buys an item that should have them in the other member group.
From the docs on specifying success member group:
Success Member Group The member group the user will be moved to after a successful purchase. Failure Member Group The member group the user will be moved to (if) their recurring payment fails. A failure can be caused by their payment being declined, their subscription ending (ie. if an Admin stops their plan from the Stripe dashboard), or other reasons.
If your site only had two items you could probably bypass the need for an extension by adding some additional template logic (I haven't tested and you might run into some parse order issues) and passing specific actions based upon the contents of the cart.
Having the ability to assign a member to a member group based upon a subscription purchase is fairly common (Charge, Membrr, and CartThrob Subscriptions all offer the functionality) but in all of those add-ons you (or you can pay someone) have to write an extension to handle the logic of determining which member group to assign someone based upon products they purchased and possibly their past purchases.