CBSubs control of CB triggers

3 years 1 month ago #323915 by activha
CBSubs control of CB triggers was created by activha
Hello

We use OnAfterNewUser and OnAfterUserRegistration to update a DB other table field.

Are these triggered before CBSubs triggers or after ?

We need to update the field before any CBSubs ones in order to affect correct affiliations.

Should we use other tiggers ?

Thanks

Please Log in to join the conversation.

3 years 1 month ago #323918 by krileon
Replied by krileon on topic CBSubs control of CB triggers
CBSubs should process after CB Auto Actions since CBSubs has to wait for payment completion information. If it's a free subscription they may be processing at the same time and you can try ordering CB Auto Actions before CB Paid Subscriptions in CB > Plugin Management to be sure its trigger bindings are done first.


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.

3 years 1 month ago #323960 by activha
Replied by activha on topic CBSubs control of CB triggers
Ok it seems that it was not an issue with triggers but with auto action plugins.

The following query now throws an error in the SQL syntax. As the query has not changed for months, I suppose something has changed but where ?
UPDATE `#__affiliate_tracker_accounts`  SET `parent_id` = '[cb_codeatid]',`address` = '[cb_address]',`zipcode` = '[cb_zipcode]',`city` = '[cb_city]', `state` = '[cb_state]', `country` = '[cb_pays]', `phone` = '[cb_phone]' [cb:if [cb_company]>"0"], `company` = '[cb_company]' [/cb:if] WHERE `user_id` = '[user_id]'

Thanks for a hint

Please Log in to join the conversation.

3 years 1 month ago #323963 by krileon
Replied by krileon on topic CBSubs control of CB triggers
The following is not valid.

[cb:if [cb_company]>"0"], `company` = '[cb_company]' [/cb:if]

Specifically you cannot do the following. Such a syntax does not exist in our substitution code and it never existed.

[cb:if [cb_company]>"0"],

The only explanation I can provide is it may have worked in the past because that usage would just consistently fail since it's invalid syntax and CB would empty that entire chunk of text. Our substitution REGEXP is a lot more strict now and will completely skip over invalid syntax. Folks, again I cannot stress this enough if the syntax is not in our following tutorial then it will not work. There are extremely few exceptions to this and they are noted in their respective usages.

www.joomlapolis.com/documentation/279-community-builder/tutorials/18353-using-substitutions-throughout-cb


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.

3 years 1 month ago #323965 by activha
Replied by activha on topic CBSubs control of CB triggers
Oupss did not notice the brackets , thanks for the hint
Corrected to
[cb:if cb_company>"0"],
The following user(s) said Thank You: krileon

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.220 seconds

Facebook Twitter LinkedIn