Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

[SOLVED] CB Auto Action After Save Registration; available fields?

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
9 years 1 month ago #270203 by krileon
AfterUserRegistration is only fired for frontend CB registrations. If you're creating users in backend it won't do anything. You'll need both AfterUserRegistration and AfterNewUser. If you're getting errors then enable debug mode and maximum error reporting in Joomla global configuration to expose the errors. If you have both queries in the same action and you didn't separate them properly then it'll error as the query needs to be terminated with ; and linebreak.

Code:
INSERT INTO `j25_virtuemart_vmusers` ( `virtuemart_user_id` ) VALUES ( '[user_id]' ); INSERT INTO `j25_virtuemart_userinfos` ( `virtuemart_user_id`, `last_name`, `first_name`, `phone_1`, `address_1`, `address_2`, `city`, `state`, `virtuemart_country_id`, `zip` ) VALUES ( '[user_id]', '[lastname]', '[firstname]', '[phone]', '[location]', '[address]', '[city]', '[state]', '[cb_select_country]', '[zipcode]' );


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 or Create an account to join the conversation.

9 years 1 month ago - 9 years 1 month ago #270232 by Thelowlandpiper
At last! the problem was that I did not realise that you need a';' at the end of each query; I had one between the two queries [as well as the line break] but not at the end of the second; it now appears to work. hooray and thanks

BT: if you're using this to integrate with VM, you need to include an entry for the 'address>type' field; 'BT' for 'Bill To' will do; otherwise, no address will display!
Last edit: 9 years 1 month ago by Thelowlandpiper. Reason: added address_type field note
The following user(s) said Thank You: krileon

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum