Selling Organic Groups using Drupal Commerce
I don't know about you guys, but I like to hang out in the Question & Answer section of drupalcommerce.org. Lots of great people in there sharing knowledge and upvoting the hardest questions. Today, I wanted to highlight a particularly great question.
In summary, Mike wants to know "How to subscribe customer to an Organic Group?" The answer is simple, you can do this using rules and about 10 minutes of clicking around. So I created a quick walkthrough and have given the step-by-steps below the video.
STEP BY STEP
1) Create an Organic Group content type
2) Add a product reference field to the Organic Group
3) Create a new product
4) Create a new Organic Group that references the new product
5) Enable the Organic Group rule "OG member subscribe (Active)"
6) Create a rule based on the event "After an Order is first paid in full" (Exported rule here)
7) Add a loop on the Commerce Order's line items.
8) Create a component that checks the line item's commerce_product field and returns a product display. (Exported rule here)
9) Add that component as an action to the loop of the first rule you created.
10) Create a component that checks the product display to see if it's an organic group. (Exported rule here)
11) Add an action "Set user to be a member of group" to that final component
12) Add that final component as an action to the loop of the first rule you created.