Skip to Content Skip to Menu

🌟Discover the Joomla AI Plugin that wrote its own story! - CB Editor Assistant 1.1now for Joomla 3, 4 & 5!
✍️ 5-Day Free Trial, then 🎯 save up to 30% with our 🛍️ Intro Offer (First 50 users, ends Dec. 31)
🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

Country display for members

  • cberry1971
  • cberry1971
  • OFFLINE
  • Posts: 125
  • Thanks: 7
  • Karma: 0
9 years 8 months ago #262220 by cberry1971
Country display for members was created by cberry1971
Good morning guys,

We use hikashop as the initial user payment component for our site and then port the user's hikashop details (name, birthdate, address, etc) over to Community Builder for them to view, manage and modify later.

One of the data we capture is country via zones (countries) provided in a hikashop table called hikashop_zone:

We have studied the article here:

www.joomlapolis.com/support/tutorials/107-use-cases/18377-configuring-a-country-field-with-cb-query-field-plugin

But this is different as our source is the hikashop data table. How should we configure our community builder field to capture the hikashop data? Upon creation in hikashop we will use the following to move data to community builder comprofiler tablers:

if(!empty($addressData->address_country)){
$fields[]='cb_country';
$values[]=$this->database->Quote($addressData->address_country);

We would like members to be able to update their country data once created in community builder.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48630
  • Thanks: 8307
  • Karma: 1446
9 years 8 months ago #262237 by krileon
Replied by krileon on topic Country display for members
CB Query Field just outputs the results of a database query. It does not move the information from 1 table to the other or anything of the sort. It does not process PHP so no your PHP doesn't do anything in this case. The Query Select field types do not store their information anywhere outside of CB either (so it can't use hikashop to store its values); they only pull their dropdown options from the results of a query.

Ideally Hikashop should allow you to write an integration that sends the profile data to CBs tables, which CB would do the same for Hikashop using CB Auto Actions. The alternative is to use CB Auto Actions for both directions, but CB Auto Actions pulling Hikashop data will be limited (e.g. act on the after login trigger with a Code action to update the user object as needed).

If you only need this information to go from CB to Hikashop then a CB Auto Actions acting on the after registration and after profile update (both frontend and backend of each) with a Query action would work. You'd then just grab those CB fields and update their corresponding Hikashop database row.


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.

Moderators: beatnantkrileon
Powered by Kunena Forum