Sorry about both the bad link and inappropriate forum etiquette. I'd posted the link to reduce repetition and provide a history. As you suggested, I'll re-post my inquiry here.
I am once again facing the plan to force certain expiry dates based on the status of members:
I still need to worry about new memberships which was addressed using this code in the "Activation' box of SQL Actions:
Code:
UPDATE `#__cbsubs_subscriptions` SET `expiry_date` = '2013-10-01'
WHERE `user_id` = [user_id] AND `plan_id` = 1 AND `status` = 'A'
Existing ACTIVE members already have the correct expiry date of 2013-90-30 when they first signed up using the same code, so when they renew the expiry date is already set going forward (1 year memberhips) so no SQL Action, I believe is longer necessary.
Here is where its getting tricky for me and hope you can assist. I have a number of EXPIRED members that will still need to renew for this year (2011-10-01 to 2012-09-30) before being permitted to renew for the new membership period (2012-10-01 to 2013-09-30).
What I was hoping was that there is some way to trigger an SQL Action with the EXPIRED status to force the renewal date to 2012-09-30 first. The theory being they that when they are bumped up to ACTIVE status and they go to renew for the new term they'll be grouped in like the others ACTIVE members.
As a side note. All these expired members have a "last renewal date" of 2011-10-01. My guess is that when they go to "reactivate" it should expire on 2012-09-30 normally BUT
I think the reason this has gotten tricky is because the above SQL action meant for NEW members is triggering the EXPIRED members expiry date also so when they reactivate the expiry date is 2013-09-30 instead of 2012-09-30 first.
From my understanding the code in SQL Action boxes trigger as follows:
Activation: For new members or when a deactivated member reactivated
Renewal: When a membership is renewed
Expiration: When a membership expires
Deactivaton: When a membership is unsubscribed
Hope this makes sense and there is a solution on the horizon.
Thanks.