CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Import (Moderator: Yashodha Chaku) »
  • pulling internal contact id doesn't work after importing contacts
Pages: [1]

Author Topic: pulling internal contact id doesn't work after importing contacts  (Read 1843 times)

shrill

  • Guest
pulling internal contact id doesn't work after importing contacts
October 22, 2009, 07:01:20 pm
Hi there.

Hoping someone here can help.

Working with Drupal 5.20, Civicrm 2.07. Yes I know I should upgrade but I can't at this time.

I had a developer help me to connect Pdf-id card (drupal module) to Civicrm, to allow me to pull the first name/ last name/ Internal Contact ID of a member (as a membership number) for printing on a membership card via pdf-id card. Members login, click on "download membership card": and get a little pdf file of the card with their name and membership number to print out.

It was working fabulously. Then I imported a contact via Civicrm/ imported the same contact as a Civicrm member, imported them as a Drupal member and synced it all up using Civirole sync. That all worked really well. But now the Internal Contact ID isn't importing at all into my ID Card....I do get the preceeding zeros, just no contact ID. The first and last names are still importing well though.

Here is the php code I have to pull the data. PHP-ID Card uses tcpdf. As someone who is only quasi-technical, I have no idea where to even start figuring out this issue.

Code: [Select]
$pdf->SetFont('dejavu sans condensed','A',8);
$pdf->SetXY(2,41);
$pdf->Cell(100,10,"The Association",0);
$pdf->SetFont('helvetica','A',12);
$pdf->SetXY(0,20);
$pdf->Cell(0,0,$civicrm['First Name'] . ' ' . $civicrm['Last Name'],0,1,'C');
$number_formated = sprintf("%07d",$civicrm['Internal Contact ID']);
$pdf->Cell(0,0,$number_formated,0,0,'C');
$pdf->SetFont('dejavu sans condensed','A',8);
$pdf->SetXY(3,3);
$pdf->Cell(3,3,"AAS",0,'C');
$pdf->SetFont('dejavu sans condensed','A',8);
$pdf->SetXY(78,3);
$pdf->Cell(3,3,"2009",0,'C');

I have also tried:
Code: [Select]
$pdf->Cell(0,0,'2008'.$civicrm['Internal Contact ID'],0,0,'C');for the Internal Contact ID, but I only get the 2008. I've looked in the database and the users seem to have an internal contact id.

Thoughts?

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Import (Moderator: Yashodha Chaku) »
  • pulling internal contact id doesn't work after importing contacts

This forum was archived on 2017-11-26.