Needs work
Project:
Ubercart Organic Group Subscribe
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
30 Aug 2010 at 17:03 UTC
Updated:
2 Oct 2011 at 05:17 UTC
Jump to comment: Most recent file
Comments
Comment #1
tinker commentedI had this working on a site a while back. Hopefully everything is in the patch but I am posting this as "needs work" because I have not tested this patch. This patch modifies the "uc_og_subscribe" table using an update. I don't know if this will work without a version number change so please compare the table and schema after update but before testing.
Please note that this feature requires a patch to og_expire so that anonymous Conditional Actions can set the expiration using og_expire_set_cron(). See #673988: API Function og_expire_set() shouldn't have access check.
Comment #2
jhrizz commentedHowdy!
Patch took with no problem, however I did have to manually create the database tables.
My concern is that, even though I have the defaults set in "Organic Groups / Expiration dates" when I add a user to a group, they still get an expiration date of "never".
I am able to click "change" and THEN have the default expiration offset take- Perfect!
I am looking to use "Ubercart Organic Group Subscribe" in conjunction with "OG Membership Expiration" in an automated sense, IE:
1) User purchases product with feature: Group Subscription
2) User is added to group
3) **OG Expire offset is applied as per the product feature
4) The rest works perfectly...
I have successfully applied the following patches. Note- I did NOT apply the code cleanup patch from http://drupal.org/node/1145702 prior to application of http://drupal.org/node/673988 - Could that be it? I will roll it back and re-apply in order and see what happens.
http://drupal.org/node/673988
http://drupal.org/node/897624
Did I miss something, or was automation not part of the functions?
I have included my patched modules to this post for evaluation.
Let me know what you think!
Thank you!
- Josh
Comment #3
jhrizz commentedI want to thank you for all of your help! Funny enough, combing through this code and logic, I had an epiphany, and solved it with rules, tokens content types. Because this is a combo solution that can't be expressed in a module, if anyone else is struggling with this and would like to know more, just ask. again, Thank you!
Comment #4
tinker commentedHey sorry @jhrizz. I've been really busy lately and have not checked into drupal for ages.
Yes the solution outlined in post #1 does provide automated expiration of group access. When assigning the product feature you should see options to set a relative or fixed expiration date at the bottom. 'Relative' uses the purchase date and adds a configurable amount such as 1 year. 'Fixed' allows you to specify one date that the group access will end.
You must also patch og_expire for these settings to work:
- First apply patch from #1145702: Module does not follow Drupal code format standards
- Then the patch from #673988: API Function og_expire_set() shouldn't have access check.
Did you get any errors when applying patches? I don't think #673988 patch would work without first doing #1145702.