- Posts: 7
- Thank you received: 0
Adding A New Custom EVENT Field to Export
- mjhi11
- Topic Author
- Offline
- New Member
Less
More
10 years 8 months ago #34838
by mjhi11
Adding A New Custom EVENT Field to Export was created by mjhi11
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
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
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.
- Matia
- Offline
- Senior Member
Less
More
- Posts: 61
- Thank you received: 0
10 years 4 months ago #39700
by Matia
Replied by Matia on topic Re: Adding A New Custom EVENT Field to Export
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.
- Matia
- Offline
- Senior Member
Less
More
- Posts: 61
- Thank you received: 0
10 years 4 months ago #39701
by Matia
Replied by Matia on topic Re: Adding A New Custom EVENT Field to Export
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.
- Tuan Pham Ngoc
- Offline
- Administrator
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
Tuan
Please Log in or Create an account to join the conversation.
Moderators: Tuan Pham Ngoc
Support
Documentation
Information
Copyright © 2024 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.