3

I´m using rules, organic groups and drupal commerce modules.

I´ve set a rule that creates a new user after the anonymous completes the checkout process.

I want the rule to assign the user to a specific group (OG). I can´t find the way to do it. I´ve added a screenshot of what are the available options,a nd it seems that there aren´t enough available selectors to do that.

Is there a way to add the user using php? How? I´ve added the print screen after setting Action: Add entity to group.

there aren´t enough data selectors

4
  • What specific group is that? Does it have anything to do with the user or the shopping process?
    – Turion
    Mar 13, 2013 at 20:27
  • Yes, the group is set as a referenced field inside the product that the user is buying.
    – Rosamunda
    Mar 14, 2013 at 19:34
  • But I could just add to the rule the subscription to an arbitrary group if I can do that with PHP...
    – Rosamunda
    Mar 15, 2013 at 18:12
  • So type "commerce-order:" in the group data collector. Does that give nothing?
    – Turion
    Mar 27, 2013 at 11:34

2 Answers 2

1

For reference, this type of use case (selling access to an organic group) would be best handled now using the Commerce License framework, that has been designed specifically for this type of use cases.

We don't have integration with Organic Groups yet, but it seems straightforward to do in the framework.

1

There is a step-by-step tutorial to do exactly what you want at http://s1l.org/selling-access-organic-groups-drupal-commerce

Also this would indeed be the perfect case for using the Commerce License framework. There is Commerce License OG module now.

1
  • 1
    Hi and welcome to Drupal Answers. You can improve your answer by providing more details and leaving the link as a reference.
    – Wtower
    Nov 6, 2014 at 16:03

Your Answer

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

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