• Resolved Mark Mar?ec

    (@mmarcec007)


    Hi,
    We are trying to expose Five Star Restaurant Reservations – WordPress Booking Plugin’s functionality through Amazon Alexa skill. We are trying to cover functionalities like checking is the requested time available, suggesting some other slots and creating the actual booking. Under the hood, we are using parts of Five Star Restaurant Reservations – WordPress Booking Plugin functions to have full compatibility, but there are few things that we are not sure if we are using it correctly.

    1. Checking the time availability
    Our users can ask for a particular time but we also want to give them several suggestions if the requested time is not available.
    We managed to identify the parts for the suggestions from restaurant-reservations/includes/Ajax.class.php which populates the calendar when booking a table.
    For this matter we used the code from the following functions:

    • get_time_slots
    • get_opening_hours
    • get_earliest_time

    But sadly, we came across some issues. The first issues was that the suggested time was the first time which was the starting time of the weekly schedule definition which is not present when booking an table from the [booking-form] shortcode. The second issue was that the time was shown in the wrong time zone when using the date() function.

    2. Time Zones
    We do have our user’s time zone information. But it is not clear which one to use when using functionalities from Five Star Restaurant Reservations – WordPress Booking Plugin. Default WordPress time zone or is there some other logic to determine that.

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • jssupport

    (@jssupport)

    Hi Mark,

    We are working to incorporate timezone and replacing the non-timezone code to make our plugin work more predictably. We do not have any separate option for timezone in the plugin. Instead, we use site’s own timezone information from General settings.

    We recommend you use the named timezone instead of offset based to prevent anomalies with DST etc.

    Apart from that, the AJAX calls were specifically designed to be processed by the JavaScript in the front-end of the plugin. If you’re trying to do a more in-depth customisation, you might be better off creating your own functions to process the booking data (using the ones inside the plugin as a template), rather than trying to use their output in a customised way.

    Thread Starter Mark Mar?ec

    (@mmarcec007)

    Thanks for your feedback.

    Sorry for not responding sooner.

    Best regards.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to suggest available booking slots?’ is closed to new replies.