mgranocchia wrote: 2) How can i subcribe an user (automatically) after registration based on a field?
(Example: user1 is woman -> subscription 1, user2 is man -> subscription 7)
Solution:
1 --- install cbqueries
2 --- new query
3 --- Trigger: onAfterUserRegistration
4 --- User: User
5 --- Conditional: Sex == Woman (or any other condition)
6 --- query:
"
INSERT INTO #__cbsubs_subscriptions(status,user_id,plan_id,subscription_date,last_renewed_date) VALUES ('A',[user_id],4*,CURRENT_DATE,CURRENT_DATE)
"
*the plan id, as in cbsubs_plans on your database