11 Posts
stevebenson223
5 years ago
6
Topic

Hi all

I am building a membership app with SEBLOD and it works OK so far, but I’m only dealing with the current year’s membership subscription. When the current year’s membership expires, all the members will need to renew their subscriptions, so I need the app to accommodate this. Either I have a field for each year (but not a calendar year - the user needs to set the start and/or end date) or a way to reset the current subscriptions to zero (not the preferred method). I could manually set up a field for each year, but it would be much better if the app could automate this. 

Has anyone ever tried to build a membership app and if so, how do you cope with annual subscription renewal? 

Hope this makes sense!

Thanks,

Steve

Get a VIP membership
1283 Posts
Bucklash
5 years ago
5
Level 1

Hi

When the user signs up, you could take the start date, add a year, and then store that in end date field. maybe do that in computation section or yourself with joomla methods or plain php in beforestore....

Then have list of stuff that shows if current user end date is greater than now... make sense?

The break field may help with rendering content only if the above condition is met....

11 Posts
stevebenson223
5 years ago
4
Level 2

Thanks for the quick reply Bucklash.

That makes sense and I’m sure it would work but the membership I’m working with has a fixed expiry date every year. So no matter when a user signs up, their subscription will expire on, say, 1st May. This was my scenario:

  • Create a new User Group (Members)
  • Create a field within it called expiry date (1st May)
  • Create an expiry date field in each User (Member) record which gets its value from the above and includes a conditional statement that if expiry date < today, then another field (PAID) = No
So, for example, on 2nd May every current member becomes unsubscribed - which is what I want. Trouble is, as soon as you reset the “master” expiry date, everyone becomes subscribed again, whether they’ve paid or not! 
I’m probably thinking about this the wrong way, but I can’t get my head around it!
1283 Posts
Bucklash
5 years ago
3
Level 3

Hi

Many ways to think about this.... i would use code pack with some php stuff to help me, i.e addToGroup()

  • The usergroup has master expiry,
  • when the user becomes subscriber the user form saves this value in user data.
  • the usergroup expiry value gets updated
  • user expiry updates to usergroup expiry when user renews membership
  • using beforerender apply php, if expiry < now(), removeFromGroup()

Not sure how I would do it with just the seblod ui stuff ie conditionals etc

11 Posts
stevebenson223
5 years ago
2
Level 4

Yes, I was afraid you were going to say that...

It's years since I did any php and I didn't understand much of it then! Anyway, I've downloaded the Code Pack and I'll dust off my old php book (maybe buy a new one) and plunge in. It's probably about time as I'm looking to use SEBLOD for a few other things and I think you need some php and possibly JavaScript knowledge to make more serious apps.

Thanks for all your help and advice, Bucklash.

Cheers

1283 Posts
Bucklash
5 years ago
1
Level 5

Hi

Yeah, you really gonna need php at some point.

The new manuals are pretty good especially the developer part as it features newer methods along with joomla docs 

11 Posts
stevebenson223
5 years ago
0
Level 6

Just had a quick look at the developer manuals... er, maybe it’ll make more sense to me after I’ve re-learned some PHP!

Cheers again!

Get a Book for SEBLOD