<SOLVED>Map Registration Field to CB

  • Posts: 241
  • Thank you received: 5
11 years 9 months ago #89953

Hi guys,

I know that in the latest version of Hikashop you put code to map user name / email into community builder. I have added one other custom field into the registration and was hoping to map that field into CB as well.

Is that something you can coach me on?

thanks.

Last edit: 11 years 8 months ago by cberry1971.

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

  • Posts: 82796
  • Thank you received: 13356
  • MODERATOR
11 years 8 months ago #90108

Hi,

We've put the code to handle that in the addAndConfirmUserInCB function of the file administrator/components/com_hikashop/classes/user.php
You would have to add your code there in a similar way to what we did.

The following user(s) said Thank You: cberry1971

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

  • Posts: 241
  • Thank you received: 5
11 years 8 months ago #90317

Ok that worked great. Can I silently map one field? For example i have a field in CB called user_type

All persons registering thru hikashop will be user_type = xxx. However, I don't need them to fill that in, i would just like it to update in CB once they register.

Also, How do i know when you do updates that the code won't be deleted? Should i just look at the changelog and make sure your updates are not changing the file i have modified?

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

  • Posts: 82796
  • Thank you received: 13356
  • MODERATOR
11 years 8 months ago #90390

Yes, you can silently map one field.

The code will be deleted when you update. It will be deleted at each update so no need to check.

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

  • Posts: 241
  • Thank you received: 5
11 years 8 months ago #90409

So I have a custom field in address table called membertype that I don't want to ask users to fill into the registration. It is just hidden with only one single drop down = "athlete"

To hide it I choose front end display = no. Is that correct?

But I can not get it to map to cb. I can get the other fields where front end display = yes to map.

What might I be doing wrong?

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

  • Posts: 82796
  • Thank you received: 13356
  • MODERATOR
11 years 8 months ago #90520

If you don't display it for the frontend it won't be there at all.

There is actually no need to create a field for that...

Simply use that code:
$fields[]='membertype';
$values[]=$this->database->Quote('athlete');

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

Time to create page: 0.060 seconds
Powered by Kunena Forum