Skip to main content

canGASelectionBeIncreased

Type: function(gaArea, defaultValue, extraConfig, ticketType)

This function is invoked when a user clicks on a GA area. If canGASelectionBeIncreased returns true, the user is able to increase the number of selected places by clicking on the + button of the ticket selector that pops up.

General Admission
  • gaArea: The GA area that has been selected.
  • defaultValue: A boolean that indicates if additional GA places can be selected. This is determined by whether the number of selected places plus the number places booked by other users is smaller than the capacity of the GA area.
  • extraConfig: Variables and data from your application. See extraConfig.
  • ticketType: The ticket type for which the user clicked on the plus button. Optional.
Accessing your application variables

This function is called inside the Seats.io iFrame and cannot access variables defined in the scope of your application. To do so, pass them first through the extraConfig configuration parameter.

The default value is determined by evaluating:

gaArea.numBooked + gaArea.numSelected < gaArea.capacity

A good use case for this callback is to allow back office users to select places that are on hold for VIP customers. If 10 VIP places are held in a GA area with a capacity of 15, users would by default only be able to select 5 extra places. You can override this as follows:

canGASelectionBeIncreased: function(gaArea, defaultValue) {
if(gaArea.label === 'Standing') {
return gaArea.numBooked + 10 + gaArea.numSelected < gaArea.capacity;
}
return defaultValue;
}