Support

Home Forums Seating Chart Add-on (EE3) Publicly Display Current Attendees Seating Locations

Publicly Display Current Attendees Seating Locations

Posted: August 21, 2013 at 11:02 pm


IT Directors

August 21, 2013 at 11:02 pm

Loving working with the Espresso platform, but I’m struggling to find a way to engineer this.

Is there a way to display a current chart of ‘who is sitting where’, to allow users to choose their seat accordingly?

Could this be added to the ‘hover over’ seat properties if it was occupied?

All the best,

Tom


Dean

August 22, 2013 at 2:03 am

Hi,

It should be possible but it would require doing some customisation to the seating chart itself as currently the code doesnt grab the attendee information.

You can request a customisation review here https://eventespresso.com/contact/customization-request-form/ though we may refer you onto a recommended developer if our workload is heavy. You can contact our recommended developers directly from here https://eventespresso.com/developers/event-espresso-pros/


IT Directors

August 22, 2013 at 10:15 pm

If anyone else would like to do this – I have put together a very rough fix. I’m sure it can be done much more efficiently, perhaps after a while someone else will tell me how – I’m pretty amateur at this stuff.

In the seating chart plugins request.php, I added this at line 138 where the seat definitions in ‘<div id=”ee_s_seat’ are being created for use in the .js window when mouse-over.

<pre class=”brush: html; gutter: true; first-line: 1; highlight: []; html-script: false”><?php
if ($ee_seat_availability_class == "ee_s_unavailable") {
/*CUSTOM – THIS SQLs TO FINF WHOS SITTING HERE IF THE SEAT IS OCCUPIED*/
$conn = my_conn();
$sql = "SELECT oin_events_seating_chart_event_seat . seat_id, oin_events_attendee.fname, oin_events_attendee.lname FROM oin_events_seating_chart_event_seat INNER JOIN oin_events_attendee ON oin_events_seating_chart_event_seat.attendee_id=oin_events_attendee.id WHERE ((oin_events_seating_chart_event_seat.event_id = ".$event_id.")AND oin_events_seating_chart_event_seat.seat_id=".$seat->id.")";

$result = 0;
$result = @mysql_query($sql, $conn)
or die (mysql_error());
$whosthere = mysql_fetch_assoc($result);
?>

occupied_by="<?php echo $whosthere['fname'].' '.$whosthere['lname']; ?>"
<?php
}
/*RESUME NORMAL PROGRAMING*/
?>

Then in the seating_chart.js file for the plugin I inserted this at line 226, when the .ee_s_seat mouseenter function is being created.

<pre class=”brush: javascript; gutter: true; first-line: 1; highlight: []; html-script: false”>//CUSTOM CODE TO DISPLAY THE NAME OF OCCUPANT
if (jQuery(this).attr('occupied_by')) {
if (jQuery(this).attr('occupied_by') == " ") {
html += "Occupied By: Processing Checkout <br/>"
} else {
html += "Occupied By: "+jQuery(this).attr('occupied_by')+"<br/>";
}
}

I’d appreciate anyones input on better ways to do this.

The support post ‘Publicly Display Current Attendees Seating Locations’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso