[SOLVED] Set specific start date for membership

8 years 10 months ago #136853 by zach.schnackel
Krileon,
I really appreciate the response. I think what I'm looking for wouldn't update a user's expiration date on a new subscription (as I need to import a number of users and adjust some dates in there) manually.

For example, if I import a user and need to set their registration date to 4/10/2005, would I be switching that within the Community Builder user database or in the Joomla! user database (I looked at the database and saw that field in jos_users, but not jos_comprofiler - but I do want to be 100% sure)?

Also, if I want to go into PHPmyAdmin (as well as the first one) and switch when their subscription starts and ends, where exactly would I go for that?

For example, I see a jos_cbsubs_subscriptions table, where I could probably edit those dates, is that the best place to do that? Would the 'last renew' and and 'subscription date' probably be set to the same?

I realize this way is doing everything manual, but if I can make sure everything will be put in correctly (since after this initial import the new subscriptions will take care of themselves) then it'd be great.

Again, I really appreciate your insight on this and am very grateful for CBSubs and Community Builder!
8 years 10 months ago #136872 by krileon

I really appreciate the response. I think what I'm looking for wouldn't update a user's expiration date on a new subscription (as I need to import a number of users and adjust some dates in there) manually.

If you're importing you can specify the users expiration date manually (by specifying the Subscription date), you do not need to use the CBSubs SQL Actions method (which will also work as Import will trigger integrations).

For example, if I import a user and need to set their registration date to 4/10/2005, would I be switching that within the Community Builder user database or in the Joomla! user database (I looked at the database and saw that field in jos_users, but not jos_comprofiler - but I do want to be 100% sure)?

The registration date is stored in the _users database table.

Also, if I want to go into PHPmyAdmin (as well as the first one) and switch when their subscription starts and ends, where exactly would I go for that?

You would need to find and edit the users subscription within the _cbsubs_subscriptions database table.

For example, I see a jos_cbsubs_subscriptions table, where I could probably edit those dates, is that the best place to do that? Would the 'last renew' and and 'subscription date' probably be set to the same?

No, you should adjust the dates within CBSubs. Navigate to the Subscriptions icon within CBSubs then click the ID of the subscription.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Templates - CBSubs - Hosting - Forge - Incubator - GroupJive
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM EST to 4:00 PM EST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
8 years 10 months ago #136875 by zach.schnackel
Krileon,
Thank you very much! I had no idea that 'ID' field in CB Subs would let me adjust that outside the database.

If I only have to go into the database to adjust the registration date (in jos_users) and then I can just manually add each user to a subscription/membership level, and then just click on each one and update the dates, that works perfectly!

Again, if I'm over excited because I'm saying something wrong up there please feel free to jump-in ha, but thank you!
8 years 10 months ago #136891 by nant
zach.schnackel wrote:

Again, if I'm over excited because I'm saying something wrong up there please feel free to jump-in ha, but thank you!


Looks like you are just beginning to realize the power of CB and CBSubs.

;)
6 years 10 months ago - 6 years 10 months ago #205531 by AlexRag
Its that time of year for me to deal with expiry dates and I wanted to use the SQL actions again to force expiry dates.

My question is I have some members whose status is "Expired" Can you tell me how I force a specific date based on that status, similar to what was done as mentioned earlier in this thread:

The code I imagine I will use is similar to this.
UPDATE `#__cbsubs_subscriptions` SET `expiry_date` = '2012-10-01'
WHERE `user_id` = [user_id] AND `plan_id` = 1 AND `status` = 'A'

So my questions:

Do I simply change the 'status = 'A' to 'E' to trigger this SQL action?

Do I place this in the SQL Actions labeled "expiration" or add in the Activation box along wit the existing code?

Right now I have code in the Activation and Renewal boxes, but those renewal dates are different.

In essence, what I am trying to accomplish is the following:

Active members who renew will have an expiry date of 2013-10-01
Expired members will have an expiry date of 2012-10-01

This means that expired members have to pay for this years membership period before renewing for next year's membership period.

My logic is that the SQL actions will be a two step process for an expired members - I'm hoping
The 'Expired' SQL Action will trigger first (2012) after which they become "Active". When they go to renew a second time the 'Active status' SQL action will trigger (2013).

Does this make sense? Am I on the right track?


Attachments:
6 years 10 months ago - 6 years 10 months ago #205533 by AlexRag
Just discovered the "E' should be an 'X'

Here's a few more things I've discovered.

When an expired membership goes to renew it's called "Reactivate" - I'm not sure how this plays out when I'm trying to force the 2012 expiration date (i.e. how the SQL Action code will differ)

An Active member indicated "renew now". Since the date of the active member is already set up accurately, I do not need to force the date. In this case, I presume I do not need to worry about an SQL action.

Hoping someone can help!
Moderators: beatnantkrileon
Time to create page: 0.415 seconds
Facebook Twitter Google LinkedIn