Setting up ticket sales with widgets

Ticketmatic’s widgets simplify setting up a more advanced ticket sales process that is better integrated in the website. Using widgets allows you to customize the ticket sales experience and interact with the website for a more integrated result. Widgets are managed by Ticketmatic and improve constantly.


Other options

If you don’t need this more advanced and integrated ticket sales process, consider using Plug and play ticket sales.

A widget is a configurable web application that covers a part of the ticket sales process. A typical ticket sales process consists of following steps:

  1. Explore events (happens on your website)
  2. Add tickets to order for an event
  3. Show basket (optional)
  4. Checkout

Widgets allow you to handle each of the steps 2 to 4 individually and allow you to navigate back to your website after each step. Compared to the plug and play approach which handles steps 2-4 in a single, straightforward wizard, this gives you much more flexibility to setup a ticket sales process that is tailored to your individual need.

Some examples of what you can achieve:

  • You can let the user iterate between steps 1 and 2 to allow the user to add tickets for more than 1 event to his order
  • You can provide your own upselling page, right before going to checkout

Widgets can be used embedded or standalone. An embedded widget is displayed inside your website (using an iframe). A standalone widget is displayed in a complete browser window. Below you can experience how an embedded widget works.

exclamation-circle

Embedded widgets used inside an iframe require the use of a custom domain that is on the same domain as your website (for example tickets.mydomain.com).


Generating a widget url

You use a widget by generating a widget url and simply linking to it.

When generating a widget url, you specify the parameters to configure the widget and then you need to generate a signature (to avoid tampering with the widget url). The easiest way to generate a widget url is by using one of the API libraries. Each library contains a helper class to generate widget urls and generating the signatures is provided by the library.

The signing helper is Ticketmatic\Widgets. Instantiate it with your account name and widget keys:

1 use Ticketmatic\Widgets;
2 
3 $widgets = new Widgets($accountname, $accesskey, $privatekey);

Pass a widget name and a set of parameters to sign the URL:

1 $url = $widgets->generateUrl("addtickets", array(
2     "event"     => 123,
3     "skinid"    => 1,
4     "returnurl" => "http://www.ticketmatic.com",
5     "l"         => "en",
6 ));

If you don’t find a suitable library or if you prefer to generate the widget urls yourself you can manually generate widget urls.


Configuring widgets

You configure widgets by providing the parameters you want. Most parameters are optional, when omitting them Ticketmatic will provide sensible defaults.

You must specify the name of the widget. Ticketmatic provides following widgets:

  • addtickets: used for adding tickets to an order (step 2)
  • basket: used for displaying and optionally modifying an order (step 3)
  • checkout: used for checking out an order (step 4)

Widget addtickets

Use this widget to add tickets for one or more events to an order. You can also use it to add products to an order.

You should at least specify the event or product parameter:

  • In the event parameter, specify one or more event ids (comma-separated) for which you want to sell tickets. Specifying multiple event ids works best when you have only a limited set of prices for each event. With too much prices, the widget quickly becomes too complicated. In that case it is best to use separate widgets for each event.
  • In the product parameter, specify one or more product ids.

Upselling

The addtickets widget supports upselling: you can specify additional events and products beside the main event or product on sale. Use the parameters extraevents and/or extratickets and specify one or more ids.

exclamation-circle
Ticketmatic only supports unseated events in the extraevents parameter.

Collecting ticket info

Use the ticketinfo parameter to specify what information should be collected for each ticket that was added to the order. The ticketinfo parameter should contain a comma-separated list of fields. If this parameter is not specified, no extra ticket information will be collected.

Supported ticketinfo fields:

ValueDescription
nameName of the ticket holder
emailE-mail address of the ticket holder

Example:

1 ticketinfo=name,email

Action after adding tickets

Use the flow parameter to specify what should happen after adding tickets to the order:

ValueDescription
returnafter adding tickets, go straight back to the website (parameter returnurl decides where the user is redirected to)
checkoutafter adding tickets, go straight to checkout (default)
basketafter adding tickets, go to the basket page. The basket page will contain an ‘Add more tickets’ link and the user will be redirected to the website when clicking this link (parameter returnurl decides where the user is redirected to)
basketwithcheckoutafter adding tickets, go to the basket page with possibility to continue to checkout. The basket page will contain an ‘Add more tickets’ link and the user will be redirected to the website when clicking this link (parameter returnurl decides where the user is redirected to)

Widget basket

Use this widget to display the contents of the current order to a user.

Allow editing the order

You can optionally allow the user to edit his order by specifying value yes for the parameter edit. If this parameter is not specified, the order is read-only.

Action after displaying the order

Use the flow parameter to specify what should happen after displaying the order:

ValueDescription
returnafter displaying the order, go straight back to the website (parameter returnurl decides where the user is redirected to)
checkoutdisplay a checkout button in the basket widget so the user can optionally continue to the checkout

Widget checkout

Use this widget to handle checkout of an order: this means registering customer, payment and delivery info and handling the online payment.

Use the parameter panels to specify what part of the checkout should be handled. The panels parameter should contain a comma-separated list of fields. If this parameter is not specified, all parts will be handled.

Supported fields:

ValueDescription
customerCustomer registration
deliverySelection of delivery method
paymentSelection of payment method and handling online payment

Action after checkout

Use the oncompletion parameter to specify what should happen after the checkout:

ValueDescription
orderdetailafter a succesful checkout, go to the Ticketmatic order detail page
returnafter a succesful checkout, go back to the website (parameter returnurl decides where the user is redirected to)

Styling widgets

You can style widgets by styling the webskin. See the webskin article for more details.

You can define several webskins. Use the parameter skinid to specify the webskin to use for the widget. If this parameter is not specified, the default webskin is used.


Parameter returnurl

The parameter returnurl can be used on any widget. It should contain the landingpage on the website where the user will be redirected to after finishing the widget. When redirecting the user to the landingpage, Ticketmatic will add following parameters to the returnurl:

  • accesskey: the accesskey that was passed in the widget url
  • orderid: the orderid used or generated in the widget
  • contactid: the id of the authenticated contact
  • reason: the reason why the user was redirected (reservemoretickets, ordercompleted, ordercancelled, return)
  • signature: Ticketmatic generates a signature so you can verify that the call to the returnurl is genuine. The parameters are signed in exactly the same way as they need to be signed for the widget url

More advanced integration

For even more advanced integration, you can combine widgets with the API. For example: you could use the API to add tickets to the basket, and then use a checkout widget for letting the customer finish his order.


More information


Questions?

We're always happy to help! Send us an e-mail