Support

Home Forums Seating Chart Add-on (EE3) Seats reserved time is hardcoded to 60 minutes

Seats reserved time is hardcoded to 60 minutes

Posted: June 3, 2014 at 3:35 pm


Cristi Constantin

June 3, 2014 at 3:35 pm

The seats which have been visually selected in the chart but not yet confirmed/checked out are kept blocked for 60 minutes, hardcoded in seating_chart.class.php -> clear_booking(). It should be dynamic and depend on Ticket Reservation Time from the General settings page.


Cristi Constantin

June 3, 2014 at 4:01 pm

Fixed it with this version of clear_booking():

static function clear_booking() {
global $wpdb;
global $org_options;

$minutes_in_past = isset($org_options[‘ticket_reservation_time’]) ? $org_options[‘ticket_reservation_time’]: 30;
$x_minutes_ago = date(“Y-m-d H:i:s”,strtotime(current_time(‘mysql’))-($minutes_in_past*60));

$wpdb->query(“delete from ” . EVENTS_SEATING_CHART_EVENT_SEAT_TABLE . ” where purchase_datetime < ‘” . $x_minutes_ago . “‘ and occupied = 0”);
$wpdb->query(“delete sces from ” . EVENTS_SEATING_CHART_EVENT_SEAT_TABLE . ” sces left join ” . EVENTS_ATTENDEE_TABLE . ” ea on sces.attendee_id = ea.id where ea.id is null and sces.attendee_id is not null”);
}


Dean

June 4, 2014 at 6:02 am

Thanks! We have a ticket outstanding to look into this, so I’ll make a further note.

The support post ‘Seats reserved time is hardcoded to 60 minutes’ 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