Adding A New Custom EVENT Field to Export

  • mjhi11
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 8 months ago #34838 by mjhi11
I've created a custom event field called NetSuiteID in the fields.xml file. I'm stumped how to include this field in the registrant export. Any assistance would be much appreciated.

Attachments:

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

More
10 years 8 months ago #34854 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Adding A New Custom EVENT Field to Export
Hi

I am sorry but the extension doesn't allow you to display that custom field in the export. If you want to have that data in the export, you will have to edit the code. The file you need to edit is administrator/components/com_eventbooking/controller.php, function csv_export .

Hope it gives you alitle help !

Regards,

Tuan

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

More
10 years 4 months ago #39700 by Matia
Tuan, I opened controller/controller.php, found the csv_export function and decided I wanted to add an additional field to the export file. The field I want to add is an additional field I added to the database. This field is within the eb_events table. I altered the sql statement for $rows by adding b.new_field_name (line 952) to pull the data from the database. Then I added "$csv_output .= ",". JText::_('EB_EVENT_DATE') ;" after the EB_EVENT title to add an additional title for this column. I used the EB_EVENT_DATE title because I know this variable is in a langauge file. I will change it to the real column name once I get this working. I also added "$results_arr[]=$r->new_field_name;" after event_title (line1041) to show the field from the database within the csv file. I tried clearing the cache and exporting the csv file, but the new field title and the new field data doesn't show anywhere in the file. Am I missing another spot that I'm supposed to alter?

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

More
10 years 4 months ago #39701 by Matia
Tuan, I was making the changes to the frontend, instead of /administrator/controller. I removed all changes from the front and made them to the administrator side and it all works well now. Thanks anyways!

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

More
10 years 4 months ago #39707 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Adding A New Custom EVENT Field to Export
Oh, OK. Thanks for the update !

Tuan

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

Moderators: Tuan Pham Ngoc