Expand Package Group Feature
Closed this issue ยท 25 comments
This Issue to track the expanding Group Subscription extension's Package Group Feature,
since @stevotvr said that "he/she wanted to implement in his/her own way" { #16 (comment) } .
Below is @stevotvr's Proposed Checklist { #17 (comment) } .
To make it Feature Rich , here are the Checklist :
- Actions to perform upon the start of a subscription:
- Add subscriber to groups (list)
- Remove subscriber from groups (list)
- Set default group for subscriber
- Actions to perform upon the end of a subscription:
- Add subscriber to groups (list)
- Remove subscriber from groups (list)
- Set default group for subscriber
- Add events for other extensions to be able to add more actions
- Template event for the start action section
- Template event for the end action section
- PHP event for when the edit package form is submitted
Hope to see this features soon.
If you need help , kindly let me know.
Thanking you , Best regards ๐
This is what I am planning:
- Actions to perform upon the start of a subscription:
- Add subscriber to groups (list)
- Remove subscriber from groups (list)
- Set default group for subscriber
- Actions to perform upon the end of a subscription:
- Add subscriber to groups (list)
- Remove subscriber from groups (list)
- Set default group for subscriber
- Add events for other extensions to be able to add more actions
- Template event for the start action section
- Template event for the end action section
- PHP event for when the edit package form is submitted
Ahh! Nice ๐
But will it have Newly registered users
Group in the group list?
Best regards ๐
Yes, the lists will include all groups.
That's a relief. ๐
Thank you very much ๐
Are you able to put tick mark in my first post?
I am thinking of updating with your check list...
Yes
First Old Comment :
This Issue to track the expanding Group Subscription extension's Package Group Feature,
since you said you wanted to implement in your own way { #16 (comment) }To make it Feature Rich , here are the Checklist :
Add user to Add Subscription Package Group [Temporally added to group, till Subscription ends] {Original Implementation}
Remove user from Remove Subscription Package Group [Temporally removed from group, till Subscription ends]
Add user to Add Permanent Package Group [Permanently added to group]
Remove user from Remove Permanent Package Group [Permanently removed from group]
Handle
Newly registered users
Group by :
- None [do nothing]
- Temporally Remove user [Temporally removed from group, till Subscription ends]
- Permanently Remove user [Permanently removed from group]
Hope to see this features soon.
If you need help , kindly let me know.Thanking you , Best regards ๐
First Comment updated with @stevotvr's Proposed Checklist { #17 (comment) } .
I'm still working on getting the current version approved for the extensions database. I'm not adding anything until that happens.
Ahh! Ok...
Not yet. I've been busy working on other projects. I may have time to work on this at the start of next year.
Ahh!!! Ok...
thanks for reply.
Thanking you , best regards ๐
I just want to let you know that I'm working on this. It's taking me a while to figure out the structure of the new system.
I need to decide what to do if the user is in multiple subscriptions that add them to the same group and one of them expires. The current system checks for that and keeps them in the group until all subscriptions to the group expire. Should the new system do the same thing? I think it should.
I also think it should.
Coz other subs are still active.
PS: there is a Bug & an improvement , which I found , I'll make issues for the same in few hours.
Thanking you , best regards ๐
@stevotvr ,
let me know when Branch stevotvr/phpbb-groupsub:1.2 is ready for Alpha or Beta testing...
Best regards ๐
I added some events to allow extensions to add custom start and end actions.
/**
* Event triggered when the actions are loaded into the package edit form.
*
* @event stevotvr.groupsub.acp_load_actions
* @var int package_id The package ID
* @var array start_actions The subscription start actions assigned to the package
* @var array end_actions The subscription end actions assigned to the package
* @var bool submit True if the form was submitted, false otherwise
* @since 1.2.0
*/
/**
* Event triggered when the actions are parsed from the package edit form.
*
* @event stevotvr.groupsub.acp_modify_actions
* @var int package_id The package ID
* @var array start_actions The subscription start actions to assign to the package
* @var array end_actions The subscription end actions to assign to the package
* @since 1.2.0
*/
The *_action arrays look like:
[
[
'action` => 'name_of_action',
'param' => 'parameter_for_action',
],
...
]
Template events to add to the package edit form are stevotvr_groupsub_acp_start_actions_after
and stevotvr_groupsub_acp_end_actions_after
.
This event is triggered to notify listeners about custom actions being triggered:
/**
* Event triggered when a custom subscription action is executed.
*
* @event stevotvr.groupsub.action
* @var int user_id The user ID
* @var string action The name of the action to execute
* @var string param The parameter for the action
* @since 1.2.0
*/
Are these events sufficient for adding custom start and end actions? Should anything about them be changed?
I'll Install this 1.2
branch and test it & check if any thing is required.
also give you feedback...
Thanking you , best regards ๐
I installed the branch 1.2
till this eb24cf5 commit.
This is awesome , also the events(PHP & Template) & actions system is nicely implemented. ๐
But with few BUGs :
- the
Newly registered users
group is missing , I wish at least that group is added fromPre-defined groups
, as new subscribers are removed when subscription is active or removed when inactive. - the default group for both
start
&end
is not saved , as if I never set them , even though I had set them. - for
Subscription end actions
, theRemove subscriber from groups
&Set default group
does not work when user's subscription is manually removed via ACP.
PS : I have some more Ideas for this extension to make it more awesome , should I make the issues for the same OR is it too much for you right now ???
Thanking you , best regards ๐
All bugs are Fixed with Package create & edit form.
Also most bugs are Fixed with subscription management when I tested with manual method in ACP that is adding a subscription to user manually in ACP & removing them.
BUT for Subscription end actions
, the Set default group
does not work when user's subscription is manually removed via ACP.
The only thing remaining it trying with Paypal account via real money transfer & stuff ... for which I don't have resources nor this testing forum runs on domain or server , it's on my local machine.
Unless I can use sandbox Paypal account to test it on my local machine, which should stimulate every aspect of Subscription
system if implemented, like add user to a Subscription.
Thanking you , best regards ๐
I can test the PayPal integration. I haven't changed anything about that, so there shouldn't be any issues.
The end actions seem to work when I try it. Can you give steps to reproduce the problem with the default group not being set?
I am adding user to group Pro
& Supporter
& remove Newly registered users
also make default as Pro
, for Sub start Action.
I am adding user to group Newly registered users
& remove Pro
also make default as Supporter
, for Sub stop Action.
Only thing that does not work is in Sub stop Action where it should make default as Supporter
.
Thanking you , best regards ๐
Thanks ๐
Working Perfectly as expected. ๐
PS : you may close this issue.
Best regards ๐