XF 2.2 Delete group when a user buys an upgrade?

Myck

Member
Hello, I need help please, I tried to do it but it was not possible, I also searched the entire forum and I did not find something similar to my case.

It is about group promotions, then I will comment on the context.

I have the following User Groups:

Free
Basic
Premium


I am using an addon that automatically adds to the "Free" group when a user registers.

I have 2 paid User Upgrades available :

Basic
Premium


When a user purchases a Basic upgrade they are added to the "Basic" user group, then the user is now part of two groups, "Free" and "Basic".

My question is how do I remove the user from the "Free" group when he buys the Basic upgrade? I have tried with the promotion of users but I cannot understand it, I would greatly appreciate if you could guide me.
 
Use the is not a member of user group criteria for the free user group promotion, and select the basic and premium user groups.

If it doesn't work, contact the add-on developer for help.

You don't need an add-on to promote members to an additional group on registration
 
Use the is not a member of user group criteria for the free user group promotion, and select the basic and premium user groups.

If it doesn't work, contact the add-on developer for help.

You don't need an add-on to promote members to an additional group on registration
I have achieved it, I created the following promotion to fulfill my two objectives.

1679021204086.png

1. Now when the user registers he is automatically assigned to the "Free" group.

2. Now if the user buys an upgrade to the "Basic" group the "Free" group is removed, but I had to run CRON manually to make it immediate.

But I find a drawback, when a user buys a Basic or Premium upgrade he expects to enjoy the group benefits immediately, but the user is still in the "Free" group before the group promotion CRON is executed.

For me it is inconvenient because the permissions that I have configured for the "Basic" and "Premium" group do not work if it is still in the "Free" group.

How can I make it so that the "Free" group is removed immediately when I buy the upgrades?

How often does the group promotion CRON run?
 
It worked for me, thank you very much.

Would this considerably affect the performance of my forum by running every minute?
Probably not... but why not just run it every 10-15 minutes and have an alert/notice to the users that the upgrades are not instant and are processed on a 10/15 minute cycle?
 
and have an alert/notice to the users that the upgrades are not instant and are processed on a 10/15 minute cycle?
I've been here,

It's a catch-22, in order to trigger a notice that a payment will take xx minutes to process the upgrade/promotion, the user needs to belong in the new user group - at which point, the xx minute wait has happened - so any notice system alert advising of the delay is now mute.

When folk pay for a digital product, they expect it immediately. The 20 minute delay is too long and they get aggitated. No amount of getting in front of this seems to work, I have even placed a custom phrase right underneath the CC card number entry field and people still do not read it!!

1686142099949.png


A custom cron at every 5 minutes is where I have landed. This means that the maximum wait is 4:59 but could be anything between that and a few seconds. Folk appear to wait up to 5 minutes without aggitation.

I kept the custom phrase on the CC payment field advising of a 20 min delay. Those that do read it, get a better than expected delay.
 
Back
Top Bottom