Knowledge base/Tips & Tricks

Collect preferences like "Inbound Flight number" during reservation

Technical Support
posted this on September 11, 2009 10:19

Sometime you may require few additional details to provide the best service to your customers, details that do not affect pricing but help you organize things. Typically for transfers you need to know inbound flight id or arrival time. TouristWay allows you to structure a list of notes that get attached to services in the reservation.

The list can be arranged in the last step of the quotation process (i.e. when user is asked for number of people and age ranges) and requires just few line of HTML.

Each note require a LABEL and some TEXT to be displayed in the reservation as "LABEL: TEXT". Usually you choose the label (i.e. ArrivalTime) and user fills the text.

This sets the "label":

<input type="hidden" name="notes[].label" value="pickup">

This sets the "text":

<input type="text" name="notes[].text" value="arrival time...">

Text can also be a multiple option box:

<input type="hidden" name="notes[].label" value="food">
<SELECT name="notes[].text">
   <OPTION value="standard">No special requirement</OPTION>
   <OPTION value="vegetarian">Vegetarian</OPTION>
   <OPTION value="glutine-free">Glutine-free</OPTION>
</SELECT>
    You can place this code anywhere inside the <form> in the last step of the quotation:
  • For notes about accommodation you can add this snippet in /templates/RAW/hlib/chkn/pickbed-2.html
  • For notes about accommodation you can add this snippet in /templates/RAW/hlib/chkn/pickcar-2.html

If you wish to know the behind-the-scene of notes, well, it's very simple. The "notes" fields generate an array (because it's 'notes[]' and not just 'notes'). This array is available for TouristWay through %-form.notes-% and it's used by the <notes> element of the "pickbed" or "pickcar" component which takes care of saving the list into the reservation's service (see for example /templates/RAW/checkina.html , component "pickbed")
 
Topic is closed for comments