[SOLVED] SQL activation query not getting called

13 years 5 months ago #146191 by mfrank410
A user can purchase multiple subscriptions (one for each campaign they create). I wrote the following SQL query and placed it in the activation field for the only plan I have available:

UPDATE `#__campaigns` SET `paid` = 1, `status` = 1 WHERE `id` = [cb_currentcampaign] AND `user_id`=[user_id]

cb_currentcampaign is a published cb field which contains the selected campaign (tested and it is getting set).

When I proceed with the purchase everything works fine. Upon return to the site I get the "Thank you for subscribing page" and a link to the invoice. But the query (above) never got called.

Any idea's?

Post edited by: krileon, at: 2010/11/16 18:42

Please Log in to join the conversation.

13 years 5 months ago #146272 by krileon
Replied by krileon on topic Re:SQL activation query not getting called
Please enable debug mode and maximum error reporting within Joomla global configuration then attempt to subscribe to see if there's a problem with the query. Please also check that CBSubs SQL Actions within Plugin Management is published and public.


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.

Please Log in to join the conversation.

13 years 5 months ago #146340 by mfrank410
Replied by mfrank410 on topic Re:SQL activation query not getting called
I enabled debug mode and maximum error reporting in Joomla global configuration (I am getting the debug output at the bottom of the screen).

I also ensured that the SQL actions plugin is published and set to Public.

The debug output does not show the query I have in SQL actions for the plan (the only plan I have setup).

I am using PayPal as the payment gateway, so the site redirects to the secure paypal page and on success it redirects you back to the payment successful page. When is the SQL action plugin actually get called? On success of the payment?

Please Log in to join the conversation.

13 years 5 months ago #146362 by krileon
Replied by krileon on topic Re:SQL activation query not getting called

On success of the payment?

Yes, the thank you page displayed upon returning from Paypal would trigger the integration or when CBSubs received the IPN to confirm the payment. Basically the exact moment the users subscription becomes active is when the query would fire. I'm not sure what the issue is exactly; have you tried with a dummy gateway instead of paypal? Please PM backend login credentials and will take a look.


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.

Please Log in to join the conversation.

13 years 5 months ago #146387 by krileon
Replied by krileon on topic Re:SQL activation query not getting called
Tab of the field being referenced in the query was not published resulting in the substitution always returning empty results.


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.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.238 seconds

Facebook Twitter LinkedIn