Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Meenakshi Ravi 13 posts 123 karma points
    Mar 01, 2017 @ 11:07
    Meenakshi Ravi
    0

    uBooking plugin customization through API

    Hello,

    We are building three sites (one per country / language) for an appointment booking system. We are considering using uBooking plugin since Umbraco is our CMS. We need the time resource since the appointment is for a specific date and time.

    I have a few questions: 1, Is it possible to enable / disable availabe dates on the calendar based on the data returned by custom Web API that connects to our database to check available dates and time slots? This information resides in a completely different application and database, which is not part of the proposed websites. 2. Is it possible to introduce day parts before showing the time slots, after choosing the date? For example, if the 14th of April 2017 is chosen in the calendar, we want to show a day part chooser with three radio buttons , which will be morning, afternoon and evening. These three options can vary depending on what's available for a chosen date. So if no slots are available until 1 pm, morning radio button will not be shown. Based on the day part chosen, the number of time slots and the actual times will vary. Is it possible to achieve that? 3. The time slots look and feel needs changing. We don't want a drop down. Is it possible to change it? 4. After the slot is chosen, and the customer completes a form with the name, email and some other details, we need a provision to send this information to our other bespoke application through Web API. Is it possible to achieve this? 5. Please could you guide me to some code samples / live integrations since I'm totally new to Umbraco and uBooking as well.

    Many thanks.

  • Cimplex 113 posts 576 karma points
    Mar 02, 2017 @ 16:44
    Cimplex
    100

    Hi,

    1 - Everything made in the uBooking section in Umbraco is done through the services, you should be able to do CRUD operations with:

    var resourceEventService = UBookingContext.Current.Services.ResourceEventService;
    var resourceEventTimeService = UBookingContext.Current.Services.ResourceEventTimeService;
    

    The recurring resource events holds how the event occur, if it is a recurring event etc. The resource event time holds the availiblity.

    See the documentation: http://www.ubooking.org/support/documentation/reference/management/services/resourceeventservice/

    http://www.ubooking.org/support/documentation/reference/management/models/resourceevent/

    .. that means that it should be possible, but it can be a little bit tricky, I think you need to play around with the services and see how far you can get by your own, then if you get stuck I'll try to help you.

    2 - I don't think that's possible, for now the way it works is that you create an event a certain date then you add the available times. If the time gets booked the time is removed from the list. There's no way to override this.

    3- All the data for the calendar is returned in a hidden field with id #Data in JSON format, when a date is selected the value is placed in a hidden field with id #SelectedDates. Maybe you could hide the overlay menu with css and create your own time picker with Javascript?

    4 - You should be able to do this with the booking service.

    5 - This link may be useful for testing and debugging: http://www.ubooking.org/support/documentation/tutorials/custom-controller/ then it's pretty much up to you to solve most of the features you want to add, I can assist you if you get stuck with smaller problems or if you have any other questions about the code.

    // Herman

Please Sign in or register to post replies

Write your reply to:

Draft