Hi, i ned some help to configure sql query, i don't know how to reset values every time plans are renewed.
I use this app in order to add credits on a table rsdirectory_users in order to sell points that allow my users to edit content on a dedicated menu.
So in these following case it work well :
- when users are suscribing to a dedicated plan (Platine, Full) : it add 50 or 150 points on the table as expected
- when user subscription has expired : it remove credits left as waiting
But the problem is when plans are renewing automatically it does'nt resetting the table and give expected points to my users (50 ,150).
1. users has 12 points left before plan are to renewing
2. after the renewal has done, it does'nt removing the 12 points and give it 50 points instead of!!!
Here my config :
- When plan (platine) are activated :
insert into #__rsdirectory_users (user_id,credits,unlimited_credits,enable_contact_form) values ([[USER_USER_ID]] , 50 , 0 , 1)
- When plan are expired :
delete from #__rsdirectory_users where user_id = ([[USER_USER_ID]])
But i don't see know how reset the table in case of plans are renewed!
I thought that every time plans are renewing automatically this mean that in the first time it expire, then it's activated again, but it seem not to be the case.
Attachments can only be downloaded by logged in users