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 »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • hook to add event id and title to export csv
Pages: [1]

Author Topic: hook to add event id and title to export csv  (Read 394 times)

lee

  • I’m new here
  • *
  • Posts: 24
  • Karma: 0
  • CiviCRM version: 4.2.16
  • CMS version: wordpress 3.8.1
  • MySQL version: 5.6.14
  • PHP version: 5.4.4.
hook to add event id and title to export csv
June 18, 2014, 12:07:21 pm
I have a civi project that has a csv report generating successfully for contributions. I am trying to add info for events—the event ID and event title. So far I have the following code, but it's not outputting the data. Can anyone help me out. I'm new to civi. Thanks.

       
Code: [Select]
    case ( $objectName == 'Event' && $op == 'create'):
                $eventID = getObjectByIDandType($objectRef->event_id, 'event');
                $event_title = getObjectByIDandType($objectRef->event_title, 'event');
                exportData($eventID, $event_title, $objectName, $objectRef);
            return;
« Last Edit: June 18, 2014, 12:35:39 pm by lee »

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: hook to add event id and title to export csv
June 27, 2014, 04:00:43 am
I am not familiar with the function exportData so I can't tell you what is happening.

However you can proceed with some simple debugging, such as:

Code: [Select]
print_r($eventID);die;
to try to see better what is happening.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • hook to add event id and title to export csv

This forum was archived on 2017-11-26.