Override full details view of an event

  • ozwest
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
5 years 5 days ago #124352 by ozwest
I have created custom fields which I want to utilise on the full details view of an event by gathering certain information together and create a different output for example:

I am asking for the organisers email address and phone number. I want to protect the email address and create a link that feeds that email address to a form (BreezingForms) for the user to contact the organiser. It would look something like:

Contact Organiser or call on 0456 765 654.

I also collect a YouTube or Vimeo link (not required to fill in by the user), so if there is a value in that field, I would like to create a small Video window with that link.

Where can I override the full details view of the event? Any better solutions maybe?

Thank you.

Did I tell you how much I love EventBooking?

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

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
5 years 4 days ago #124355 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Override full details view of an event
Hello

If you want to customize the part which display custom fields of event, please look at the file components/com_eventbooking/themes/default/common/event_properties.php and perform the customization (search for if (isset($item->paramData)) on that file to see the code which output custom fields)

Tuan
The following user(s) said Thank You: ozwest

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

  • ozwest
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
4 years 11 months ago - 4 years 11 months ago #124773 by ozwest
Replied by ozwest on topic Override full details view of an event
So, can I replace the if (isset($item->paramData)) calling each of the custom fields?

I don't want to display all the custom field, one of the custom fields is for the user to tick that he agrees to the terms and conditions and this field I don't want to display on the details page. (see Sample Event )

Also, where would I copy this file to create a custom override, so that it does not get overwritten when there is an update?

Thank you
Last edit: 4 years 11 months ago by ozwest.

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

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
4 years 11 months ago #124795 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Override full details view of an event
Hello

Yes. That's correct. You can replace that block of code with the code to show individual custom fields you want

If you want to display value of an event custom field, you can use this syntax $item->name_of_field;

For example, echo $item->field_speaker; echo $item->field_hours;

And Yes, you can move the modified file to PATH_TO_TEMPLATE/html/com_eventbooking/common folder so that the change won't be lost when you update to future releases

Regards,

Tuan

Tuan

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

  • ozwest
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
4 years 11 months ago #124981 by ozwest
Replied by ozwest on topic Override full details view of an event
Hello Tuan

I completely omitted the params section and have added the following code to events_properties.php which sits in the template override:

if ($item->field_presenter =! 0)
{
?>
<tr class="eb-event-property">
<td>
<strong><?php echo "Presenter"; ?></strong>

</td>
<td class="eb-event-property-value">
<?php echo $item->field_presenter; ?>
</td>
</tr>
<?php
}

if ($item->field_youtube =! 0)
{
?>
<tr class="eb-event-property">
<td>
<strong><?php echo "YouTube Link"; ?></strong>

</td>
<td class="eb-event-property-value">
<?php echo $item->field_youtube; ?>
</td>
</tr>
<?php
}


I get no output whatsoever, do you know what I am missing here?

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

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
4 years 11 months ago #124996 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Override full details view of an event
The code should be
if (!empty($item->field_presenter))
{
}

Same for other if commands

Could you please make the change, then try again? If it still does not work, submit a support ticket sending us super admin account of your site and link to that page so that we can check to see what's wrong and get it sorted

Tuan

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

More
4 years 5 months ago #129615 by George Hageman
Replied by George Hageman on topic Override full details view of an event
On my distribution of eventbooking I have the following directories:
../com_eventbooking
controller
helper
model
payments
tcpdf
view

I don't have a themes directory ... what am I missing? Where should this code be?

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

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
4 years 5 months ago #129617 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Override full details view of an event
Hi George

The code should be on that folder. If not, you are using a very outdated version of the extension and should update

Tuan

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

Moderators: Tuan Pham Ngoc