EventBrite Listings / Integration

I have a client that wants to display a list of EventBrite events on their Modx site and then be able to click through to by tickets either on their site or by going to the EventBrite site. I understand there are different ways to checkout, either using embedded or classic widgets - I don’t mind which but first I need to get the listing on there. Anybody have any experience of this or tips?

I’ve never used it, but Ebents might be what you need.

Thank you - I saw it but it looks way out of date to me.

1 Like

On the Modx side things don’t change much, old extras can be perfectly usable.

Give it a go, it might work a treat

1 Like

I just use the classic widgets. I stored the event id in a TV and then displayed the widget on the event page when the TV wasn’t empty. The iframe is pretty simple to see where to insert the id.

2 Likes

<iframe title="Event Registration" src="https://www.eventbrite.com/tickets-external?eid=[[*eventbrite]]&ref=etckt&v=2" frameborder="0" height="280" width="100%" vspace="0" hspace="0" scrolling="auto" allowtransparency="true"></iframe>

1 Like

Thank you yes looks pretty straightforward but I was wondering if there’s a way to get all current events. Say the client was running 20 training courses, they would have to set the events in eventbrite but then create an equivalent event in Modx, or am I misunderstanding?

1 Like

In our case we just use eventbrite as a ticket seller, not as a promotion portal. All events are marked private and we create the content on our site for the event and display the widget.

1 Like

Here is a snippet using the api…

<?php
$eventId = $modx->getOption('eventId', $scriptProperties);
$token = $modx->getOption('token', $scriptProperties);
$url = 'https://www.eventbriteapi.com/v3/events/' . $eventId  . '/?expand=ticket_availability';
$headers = [
    'Authorization: Bearer ' . $token
];
$ch = curl_init();
$timeout = 5;
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$json = curl_exec($ch);
curl_close($ch);

$array = $modx->fromJSON($json);
$output = $modx->getChunk('EventTpl', $array);

return $output;

In your template or doc…

[[EventBrite? &eventId=`[[*eventbrite]]`]]

I n the URL field at the top, you see something like https://www.eventbrite.com/myevent?eid=123456789 . The number after eid= is the Event ID. In this example, the Event ID is 123456789 .

In the properties of the snippet add your token from your account panel in eventbrite.

2 Likes

Thank you that looks good

1 Like