Name display in Jdonation Donors

  • Pinkeltje
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
4 years 8 months ago #126994 by Pinkeltje
Name display in Jdonation Donors was created by Pinkeltje
Module is showing only firstname and lastname. In the Netherlands people often have a middlename which is really part of the complete name.
E.g: Piet de Boer or Piet van de Boer. Now module shows only Piet Boer, as far as I can see those are retreived from donors table. Full names are stored correctly in Joomla user table as well as in Community Builder correctly. Is there a way to retrieve full names (with middlename) from one of these tables?

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

More
4 years 8 months ago #126995 by Mr. Dam
Replied by Mr. Dam on topic Name display in Jdonation Donors
Hi,
Currently, Joom Donation only show First Name and Last Name in the module. If you want to show Middle Name, you should create custom extra field in Joom Donation and assign it with the field in Community Builder. After that, you also need to modify the module to show value of the middle name at frontend.
Thanks
Dam

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

  • Pinkeltje
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
4 years 8 months ago #126996 by Pinkeltje
Replied by Pinkeltje on topic Name display in Jdonation Donors
Already created custom field assigned to CB. But as custom fields are stored in a separate table I'm not sure how to proceed to modify the module. Could you give me a hint please?

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

More
4 years 8 months ago #126997 by Mr. Dam
Replied by Mr. Dam on topic Name display in Jdonation Donors
Hi,
You mean that value of middle name in CB aren't stored in the same table with first name and last name?
Dam

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

  • Pinkeltje
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
4 years 8 months ago #126998 by Pinkeltje
Replied by Pinkeltje on topic Name display in Jdonation Donors
Exactly. In module I suppose it get values from jd_donors with this code:
Code:
$name = $row->first_name.' '.$row->last_name ;
Custom field is present in jd_fields, but that's only the fieldnames
And then it is linked to table jd_field_value as follows:

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

More
4 years 8 months ago #126999 by Mr. Dam
Replied by Mr. Dam on topic Name display in Jdonation Donors
Yes, value of custom fields are being stored in table: #__jd_field_value
You must query data of custom field through ID of Donation record and Field ID.
Thanks
Dam

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

  • Pinkeltje
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
4 years 8 months ago #127000 by Pinkeltje
Replied by Pinkeltje on topic Name display in Jdonation Donors
Can you explain how to do that please? I'm not much of a coder.

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

  • Pinkeltje
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
4 years 7 months ago - 4 years 7 months ago #127064 by Pinkeltje
Replied by Pinkeltje on topic Name display in Jdonation Donors
Found a simple solution. As I am not using the field Address 2 I've mapped this to CB field middlename, changed the title and placed the field between First Name and Last Name and made an override of the module view with this change in line 40
Code:
$name = $row->first_name.' '.$row->address2.' '.$row->last_name;
Last edit: 4 years 7 months ago by Pinkeltje.

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

Moderators: Mr. DamDũng Nguyễn Việt