The Business and Enterprise Editions of KonaKart support bookable products. A bookable product is a product that has a start and end time and may also have a schedule associated with it (i.e. a course which may be given for two hours a day on Wednesdays and Thursdays).
To configure KonaKart for selling bookable products, the following steps must be taken :
Using the Admin App, ensure that the "Product Type" attribute of all bookable products is set to "Bookable Product". When this is set, a sub folder appears which allows you to enter the specific data for bookable products:
The start and end dates are required attributes. They may be equal if a product is only valid for one day. Note that the Admin App automatically sets the time of the start date to be 00:00 and that of the end date to 23:59. If you are using the API directly, we recommend that you use the same convention. Once these have been entered, the "New Time Slot" button is enabled which allows you to insert time slots for the product. A time slot defines a start and end time for any day that lies between the start and end dates. A day may have multiple time slots. For example a course could be given for 2 hours in the morning and 1 hour in the afternoon.
Other attributes include the maximum number of bookings available and the current number of bookings, which is updated automatically as bookings are made. There are a number of custom fields that can be used to store information applicable to the type of bookable product.
If your application doesn't support bookable products, you may remove the "Bookable Product" entry from the product type drop lists in the Admin App, by setting the Hidden Product Types configuration variable from the Configuration >> Admin App Configuration section of the Admin App. As can be read in the Online Help, the id for Bookable Products is 6 .
Whenever a bookable product is purchased, the code that processes the order may be found in the OrderIntegrationMgr and the AdminOrderIntegrationMgr in the manageBookings() method. For performance reasons the code that calls this method (within the managers) is commented out and must be uncommented. The manageBookings() method parses the order and creates one or more booking objects which are saved in the database. These booking objects are related to the bookable product, the customer and to the order so that the bookings for any product, customer or order may be fetched using the KonaKart APIs.
The Admin App allows you to view and edit bookings. The Products Panel, Customers Panel and Orders Panel all have a "Bookings" button that opens up a Bookings panel that displays the bookings for the selected object. The button is not displayed if the role of the admin user doesn't allow him to view the Bookings panel.
The Application API contains a method ( getBookableProductConflict() ) that determines whether for a customer, a new booking may conflict with bookings that the customer has already made.