The TUI Cars Go Component
Description
Cars Offer Component
Description
Cars Offer Component
TUI Cars Go is a cross-selling module that generates and displays a selection of rental cars, based on existing travel data such as location and date. This allows the customer to book a rental car very quickly during his booking process. Stand-alone use is not possible with this component. TUI Cars Go sends its requests directly to the backend system TUI Wheels and receives the vehicle offers, including prizes, pictures, etc. from there. These offers are displayed in a horizontal arrangement from which the customer makes his selection. The selected vehicle will then be handed over to the surrounding website via the cotton-ball event, which in turn will generate a booking in TUI Wheels.
Screenshots
Banner
Offer Selection
Calendar
Driver Selection
Custom Driver
Summary
Meta
Maintainer | jan.stangenberg@tui.com |
---|---|
Locales |
en-US , de-DE
|
Usage
Add the following script tag (or something similar) to your web page to have the component load. Note: This is required only once per webpage, even when you embed multiple instances of the component.
<script src="https://6m.tuicars.com/go/build/tuicarsgo.esm.js" async defer></script>
Add the following HTML code anywhere in your webpage at the position where you want the component to show. You can create multiple instances of the component.
Remember to replace VALUE
with actual valid values for the given attribute.
<tui-cars-go
airport-code="VALUE"
start-date="VALUE"
end-date="VALUE">
</tui-cars-go>
Examples
-
A minimal implementation.
<tui-cars-go airport-code="GRO" start-date="2020-05-03T10:00:00" end-date="2020-05-08T10:00:00"> </tui-cars-go>
Read more about using components ›
Attributes
This component can be configured with the following attributes:
Name | Description | Allowed Values | Default | Required |
---|---|---|---|---|
expanded |
Initially show banner or offer selection. |
true , false
|
no | |
airport-code |
Airport code for initial offers request. |
^[A-Z]{3}$
|
yes | |
start-date |
Start date for initial offers request. |
^[0-9]{4}-[0-9]{2}-[0-9]{2}[A-Z]{1}[0-9]{2}:[0-9]{2}:[0-9]{2}$
|
yes | |
end-date |
End date for initial offers request. |
^[0-9]{4}-[0-9]{2}-[0-9]{2}[A-Z]{1}[0-9]{2}:[0-9]{2}:[0-9]{2}$
|
yes | |
number-of-persons |
Number of persons for initial offers request. |
^[0-9]{2}$
|
no | |
flight-number |
Number of arrival flight without spaces. |
^[A-Z,a-z]{2}[0-9]{4,5}$
|
no | |
enable-custom-driver |
Enables the user to set a custom driver. |
true , false
|
no |
Events
Event | did-load |
---|---|
Type | publish |
Description | Event is sent after the component has been loaded. |
Payload | none |
Event | expanded |
|||||||
---|---|---|---|---|---|---|---|---|
Type | publish | |||||||
Description | Indicates whether the component is open or not. |
|||||||
Payload |
The payload object of this event has the following properties:
|
Event | offer-selected |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Type | publish | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description | Triggers when an offer is selected, is null if offer is deselected |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Payload |
The payload object of this event has the following properties:
|
Event | start-date-changed |
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Type | publish | |||||||||
Description | Returns the new start date. |
|||||||||
Payload |
The payload object of this event has the following properties:
|
Event | start-time-changed |
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Type | publish | |||||||||
Description | Returns the new start time. |
|||||||||
Payload |
The payload object of this event has the following properties:
|
Event | end-date-changed |
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Type | publish | |||||||||
Description | Returns the new end date. |
|||||||||
Payload |
The payload object of this event has the following properties:
|
Event | end-time-changed |
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Type | publish | |||||||||
Description | Returns the new end time. |
|||||||||
Payload |
The payload object of this event has the following properties:
|
Event | flight-number-changed |
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Type | publish | |||||||||
Description | Returns the new flight number. |
|||||||||
Payload |
The payload object of this event has the following properties:
|
Event | validate |
|||||||
---|---|---|---|---|---|---|---|---|
Type | subscribe | |||||||
Description | Returns validation information. |
|||||||
Payload |
The payload object of this event has the following properties:
|
Event | set-drivers |
|||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Type | subscribe | |||||||||||||||||||||||||||||||||||||||||||||
Description | Set driver details. All drivers need an identifier, which can be assigned individually (e.g. a). By specifying the identifier, the spelling of the name or birthdate can be adapted afterwards - in this case, pass all corrected data again. To unset drivers pass undefined. |
|||||||||||||||||||||||||||||||||||||||||||||
Payload |
The payload object of this event has the following properties:
|