Ticket #

Whenever you're dealing with a ticket in your template, you're actually working with a Ticket object.

Attributes #

AttributeDescription
idID of the ticket.
titleThe ticket name/title.
nameThe ticket name/title.
purchasableIdReturns this ticket id - as ticket's are purchasables.
eventThe ticket's Event.
eventIdThe ticket's event ID
typeThe ticket's ticket type.
typeIdThe ticket's ticket type ID
skuThe sku of the ticket.
quantityThe quantity of the ticket.
priceThe listing price of the ticket.
availableFromThe date this ticket is available for sale.
availableToThe date this ticket will no longer be available for sale.
taxCategoryThe tax category this ticket uses when their tax calculations are made.
shippingCategoryThe shipping category this ticket uses when their shipping calculations are made.
isAvailableWhether this ticket is available for purchase. This will be true, unless the 'Available To/From' date ranges (when set) do not fit the current time. Will also check for purchased tickets for this ticket.

Methods #

MethodDescription
getCpEditUrl()The url to edit this ticket in the control panel.
getPurchasedTickets(lineItem)Get all Purchased Ticket's for this ticket.

Get started with Events

Available for Craft 3. Get it from the plugin store.