The following examples will present some of the more advanced and specific usage
The following example demonstrates the creation of booking profiles which can be used to create buttons or call via javascript. Button profiles additionally allow sending instructions to pre-select a specific service, category or staff.
The addingBookingProfile method will create a new booking profile. The first parameter is a text id which is needed to apply the profile in other methods. The second parameter is an object containing button config settings.
The generateButtonByProfile method will create a Book Now button based on a specific profile settings. The first parameter is the Document Element ID where you wish the button to be created. If the id does not exist on the page, the button creation will be aborted. The second parameter is the profile text id, remember the the text id is case sensitive.
Here are the buttons that have been created from the above example. As you will see the buttons are configured to select a specific service.
The profile text id can also be used with the booxiController.open method as the first parameter. This can be applied to any onclick methods as shown in this link : Book Service 1.
Note : The button profiles settings are the same button settings are used with the createBookingButton method which directly creates a button without a profile.
For experienced Javascript users it is possible to manually launch Book Now without having to resort to using profiles or creating buttons. The booxiController.open method allows custom properties that will apply some specific behavior on the Book Now session about to be launched.
Supported settings are : language, serviceCategoryId, serviceId, staffId, customRequest
The above examples shows a simple usage where you define a function with a custom call to booxiController.open. The function can then be called to execute the custom behavior. For example adding the function call to a custom button on click, as shown here.