Eztix Remote Kiosk API Demo

Server communication: INACTIVEACTIVE
Test Event Tickets
Ticket Description Available Cost
Test Cart
Ticket Quantity Total
 update
Sub-total:
Discount:
Fees:
Tax ():
Donate to :

$
TOTAL:
Discount Code:
Clear Cart Checkout

Installation

  1. jQuery must be installed, recommended version 1.11.0. The include must appear before any of the following scripts.
  2. Add the following script to your page:

  3. The required scripts will be loaded, and a global object called eztixKioskRemote will be created.
    Once this is ready, it will trigger the eztixKioskRemote_ready event (see event section below). View the source of this page to see how to correctly handle that event, and other examples.

API

Functions

* The following functions can be called on the eztixKioskRemote object when ready.

* Only one call to the server is allowed at a time, additional calls will be blocked.

init(producerId, eventParentId)
Call this once eztixKioskRemote has loaded.

producerId: Your producer ID.
eventParentId: Your event parent ID. This can be found by editing any sub event in the OCP, it follows the event title in brackets.

Returns: boolean
loadTicketStatus(callback)
Optional function to call when server responds.

callback: Callback function, should accept one boolean parameter, which indicates if the ticket status call was successful.
getAllEventData()
Gets entire event status data object retrieved by loadTicketStatus.

Returns: Object {}
getEventData(eventId)
Gets subset of the event status data object retrieved by loadTicketStatus for a specific sub-event id.

eventId: A sub-event id

Returns: Object {}
getEventTicketData(ticketId)
Gets subset of the event status data object retrieved by loadTicketStatus for a specific ticket id.

ticketId: A ticket id

Returns: Object {}
loadCart(callback)
Use to do the initial cart load (usually once per page).

callback: Callback function, should accept one boolean parameter, which indicates if the call was successful.
getCart()
Gets a the cart data object.

Returns: Object {}
setTicketQuantity(ticketId, quantity)
Sets the quantity of a specific ticket id in the local cart.
DOES NOT make a call to the server, use update cart if this is successful.

ticketId: A ticket id

quantity: The required quantity, >= 0

Returns: boolean
increaseTicketQuantity(ticketId, quantity)
Increase ticket quantity in local cart by specified quantity, if quantity not set, then by 1.
DOES NOT make a call to the server, use update cart if this is successful.

ticketId: A ticket id

quantity (OPTIONAL): The required quantity, >= 0.

Returns: boolean
decreaseTicketQuantity(ticketId, quantity)
Decrease ticket quantity in local cart by specified quantity, if quantity not set, then by 1.
DOES NOT make a call to the server, use update cart if this is successful.

ticketId: A ticket id

quantity (OPTIONAL): The required quantity, >= 0.

Returns: boolean
addDiscountCode(discountCode)
Adds a discount code to the cart. To remove an existing code pass an empty string.
DOES NOT make a call to the server, use update cart if this is successful.

discountCode: The discount code

Returns: boolean
setDonationAmount(donationAmount)
Adds a charity donation amount to the cart. Set to zero if removing donation amount.
DOES NOT make a call to the server, use update cart if this is successful.

donationAmount: The donation amount, >= 0

Returns: boolean
clearCart(callback)
Clears all tickets from cart, automatically make update call to server.

callback: Callback function, should accept one boolean parameter, which indicates if the call was successful.
submitCart(callback)
Submits updated cart to the server, call after successful setTicketQuantity, increaseTicketQuantity, decreaseTicketQuantity etc.

callback: Callback function, should accept one boolean parameter, which indicates if the call was successful.
checkout()
Forwards to second step of kiosk checkout process on eztix.co.
getIsBusy()
Test if call to server is in progress.

Returns: boolean
getErrorsList()
Gets a list of all errors from last call to server, one error per line (no html).

Returns: string

Events

* All events are triggered on the page's 'body' element.

eztixKioskRemote_ready
Triggered when eztixKioskRemote is ready to be initialised.
$('body').on('eztixKioskRemote_ready', myFunction);
eztixKioskRemote_busy
Triggered when a call to the server begins.
$('body').on('eztixKioskRemote_busy', myFunction);
eztixKioskRemote_notBusy
Triggered when a call to the server ends.
$('body').on('eztixKioskRemote_notBusy', myFunction);