Please post all pre-sales questions of all products on this forum

Integration with Community Builder

  • Sue Babcock
  • Topic Author
  • Offline
  • New Member
  • New Member
More
8 months 3 weeks ago #169774 by Sue Babcock
Integration with Community Builder was created by Sue Babcock
In a website that schedules dog classes, the users may have more than one dog. Community Builder can handle this and the information for each dog would be part of the user's profile. My question is when the user signs up for an event, is there a way for them to select the dog they want to attend the event (such as a dropdown list linked to the CB fields) so that only the selected dog's information would appear in the sign-up page based on integration and CB conditionals?
Thank you!
 

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

More
8 months 3 weeks ago #169776 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Integration with Community Builder
Hi Sue

That should be possible by creating an SQL field to list the dog of users. But you will need to know how to write the SQL command to return the dogs of user store in Community Builder database

Regards,

Tuan

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

  • Sue Babcock
  • Topic Author
  • Offline
  • New Member
  • New Member
More
1 week 3 days ago #173316 by Sue Babcock
Replied by Sue Babcock on topic Integration with Community Builder
Thank you, Tuan! It's been a journey, and I can get a list of all the dogs of all the users (SELECT cb_dogname AS text FROM #__comprofiler), but I cannot figure out how to limit this to just the logged in user in Payment Forms. Can you help with that?
Thanks again!

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

More
1 week 3 days ago #173317 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Integration with Community Builder
Hi Sue

In the SQL command, you can use [USER_ID] tag. It will be replaced ID of logged in user.

That should work for your need

Regards,

Tuan

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

  • Sue Babcock
  • Topic Author
  • Offline
  • New Member
  • New Member
More
1 week 2 days ago #173323 by Sue Babcock
Replied by Sue Babcock on topic Integration with Community Builder
Thank you, Tuan! I think I figured it out. This command seems to work perfectly:
SELECT cb_dogname AS text FROM #__comprofiler WHERE user_id=[USER_ID]

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

More
1 week 2 days ago #173324 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Integration with Community Builder
Yes, that is the right SQL command to use for your case. I'm glad you figured out (I haven't looked at CB for long time, so I do not remember the column which store user id in that table, that was the reason I did not give you the exact SQL command to use)

Regards,

Tuan

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

Moderators: Tuan Pham NgocGiang Dinh TruongDang Thuc Dam