Registration

11 years 6 months ago #213638 by mikedell
Replied by mikedell on topic Re: Registration
the query works

Please Log in to join the conversation.

11 years 6 months ago #213639 by mikedell
Replied by mikedell on topic Re: Registration
do i have all the right variables in there, or is there a list of variables I can get to?

Please Log in to join the conversation.

11 years 6 months ago #213665 by krileon
Replied by krileon on topic Re: Registration
Your user id substitution isn't correct. You have [userid] and it needs to be [user_id]. You probably have a bunch of invalid subscription rows in your database too. You need to watch the subscriptions table to see if a row is inserted. I've no idea what [cb_date] is and it probably should be NOW() so the subscription starts the minute it was inserted. Below is an example from the information provided on page 1.
INSERT INTO `#__cbsubs_subscriptions` ( `status`, `user_id`, `plan_id`, `parent_plan`, `parent_subscription`, `replaces_plan`, `replaces_subscription`, `subscription_date`, `last_renewed_date`, `expiry_date`, `next_event_date`, `next_event_id`, `next_event_params`, `autorenew_type`, `autorecurring_type`, `regular_recurrings_total`, `regular_recurrings_used`, `previous_recurrings_used`, `previous_expiry_date`, `previous_status`, `ip_addresses`, `integrations` ) VALUES  ( 'A', '[user_id]', 1, 0, 0, NULL, NULL, NOW(), NOW(), DATE_ADD( NOW(), INTERVAL 1 YEAR ), NULL, 0, '', 0, 0, 0, 0, 0, NULL, 'R', '[registeripaddr]', '' )

I don't know what the duration of your plan is so assumed it's 1 year. So have calculated the expiration date for 1 year from time of subscription. When you add a subscription through a query you must calculate everything manually; we really really do not recommend this approach and beyond this I can't help you any further.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: mikedell

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.181 seconds