Okay
  Public Ticket #3186542
Date and Time Features
Closed

Comments

  •  2
    Michael started the conversation

    Is there any way (api hooks or any other) to let the user select a start time of hourly increments instead of split up? 

    For example: I'm using it to book hourly rehearsal rooms. We are open from 10am - 11pm. Let's say a user wants to book a room for 3 hours. It will only let them choose 4 starting times in the day. I want them to be able to pick any starting time that's not booked. So, instead of just 10am, 1pm, 4pm, 7pm, etc. I want them to have 10, 11, 12, 1, 2, 3, etc available if they aren't booked. How can I do that?

    Also, I need to be able to force 3 hour minimums after 7pm to book. I have some other options I need to code in as well so I'm hoping there is some sort of an api or hooks I can grab.

  •  1,619
    Marko replied


    Hello Michael,

    Thank you for reaching out to us.

    1. Is there any way (api hooks or any other) to let the user select a start time of hourly increments instead of split up?  - We are not sure what you want to achieve here?

    2. For example: I'm using it to book hourly rehearsal rooms. We are open from 10am - 11pm. Let's say a user wants to book a room for 3 hours. It will only let them choose 4 starting times in the day. I want them to be able to pick any starting time that's not booked. So, instead of just 10am, 1pm, 4pm, 7pm, etc. I want them to have 10, 11, 12, 1, 2, 3, etc available if they aren't booked. How can I do that? - If your service last for 3 hours you can show them on every hours, 15 minutes 5 minutes, etc. You need to go to seetings/general settings and turn off the option called Use service duration for booking a time slot and then you need to adjust default time slot step.

    If you set it to one hour you will show your services on every hours. This should help.

    3. Also, I need to be able to force 3 hour minimums after 7pm to book - We are not sure what you want to achieve here. There is no option to force someone to book some hours. You can create service that lasts 3 hours and assigne employee to work on that service only after 7 pm. In that way they will be able only to book a service that lasts 3 hours.

    As for hooks, these are all the hooks that we have:

    Amelia currently has the following hooks:

    <script>
    window.ameliaActions = {
      ViewContent: function (success = null, error = null, data) {
        //triggered when the form loads
        console.log('ViewContent HOOK')
        console.log(data)
        console.log('------------')
      },
      SelectService: function (success = null, error = null, data) {
        //triggered when the service is selected/changed in the form
        console.log('SelectService HOOK')
        console.log(data)
        console.log('------------')
      },
      SelectEmployee: function (success = null, error = null, data) {
        //triggered when the employee is selected/changed in the form
        console.log('SelectEmployee HOOK')
        console.log(data)
        console.log('------------')
      },
      SelectLocation: function (success = null, error = null, data) {
        //triggered when the location is selected/changed in the form
        console.log('SelectLocation HOOK')
        console.log(data)
        console.log('------------')
      },
      SelectCategory: function (success = null, error = null, data) {
        //triggered when the category is selected/changed in the form
        console.log('SelectCategory HOOK')
        console.log(data)
        console.log('------------')
      },
      SelectPackage: function (success = null, error = null, data) {
        //triggered when the package is selected/changed in the form
        console.log('SelectPackage HOOK')
        console.log(data)
        console.log('------------')
      },
      InitiateCheckout: function (success = null, error = null, data) {
        //triggered once the customer lands on the "info" page where they fill in their details
        console.log('InitiateCheckout HOOK')
        console.log(data)
        console.log('------------')
      },
      Schedule: function (success = null, error = null, data) {
        //triggered once the 'on-site' booking is completed
        console.log('Schedule HOOK')
        console.log(data)
        console.log('------------')
      },
      Purchased: function (success = null, error = null, data) {
        //triggered once an online booking is completed
        console.log('Purchased HOOK')
        console.log(data)
        console.log('------------')
      },
      beforeBooking: function (success = null, error = null, data) {
        //triggered when the "Confirm" button is clicked but before the booking is completed.
        //This hook currently doesn't work for Mollie and WooCommerce payments
        console.log('Before booking is created HOOK')
        console.log(data)
        console.log('------------')
      },
    }
    </script>

    These are the same hooks used in Google Analytics and Facebook Pixel integrations, but if you need some other hooks added, please let us know which ones and explain what they would contain and when they should be triggered.

    We wish you all the best.

    Have a nice day. 

    Kind Regards, 

    Marko Davidovic [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps, floor plans, choropleth maps, and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  •  2
    Michael replied

    Thanks. This is a huge help. That service duration tip fixed that. Now I need to set it so that certain members can only book x number of hours per week. I think I can do that through using membership roles from another plugin as well as the hooks you provided. 

  •  1,619
    Marko replied

    Hello Michael,

    You are most welcome, and we are glad that we were able to help you. Hopefully, you will manage to achieve what you need. If you have any more questions please open another ticket and we will gladly help you there.

    We wish you all the best.

    Have a nice day. 

    Kind Regards, 

    Marko Davidovic [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps, floor plans, choropleth maps, and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables