Dummy service providers

I want to set on-line appointments for a ski-school, where trainer can teach up to 3 persons at a time. I have about 10 trainers (service provider) who will provide lessons up to 3 persons each at a given time. Sould I make two dummies for each trainer (20 of them in sum) or those two can serve for the whole school? If so how to make it?

And two more questions following the main one:
2. How to make dummy teachers invisible if I want to have page on which clients choose teacher and then they choose the time slot?
3. Is it possible to prepare page on which clients can choose teacher and then they choose time slot for a specific date (or the other way around)?

  • Alexander

    Hi @Tom,

    The problem here, is that once a service provider is booked for a slot, they can't be booked again. The user would need to choose one of the dummy providers. This also means if we hid the dummy providers, they would be useless.

    Now, the FAQ tab of the plugin provides us with this custom code:

    function increase_capacity( $capacity, $service_id, $worker_id ) {
        return 3;
    }
    add_filter( 'app_get_capacity', 'increase_capacity', 10, 3 );

    You can place this code in functions.php of a theme (or Child Theme), in your own plugin, or using something like Code Snippets.

    It will allow you to increase the capacity, and end up with multiple users per service provider without the use of dummy accounts.

    Next, with shortcodes, you can be very specific about how you want the booking process to work. For example, if you specify a service ID, you can remove the shortcode that requests users to select a service altogether.

    [app_monthly_schedule service=1]

    Now they will just need to select a provider, then book choose a time slot from the calendar.

    Best regards,

  • Tom

    Hi Alexander,

    great answer. However, because I'm not good at PHP, please tell me what those numbers mean. And how do I limit number of clients for a single time slot to 3, 4 or any other amount.

    And more important what this excerpt from FAQ means:

    "Please also note that this is a kind of "hack" and when you have more than one service provider, this function may not work as expected in regards to working hours, as "virtual" providers will not be bound to working hours of existing providers."

    Regards

  • Alexander

    Hi @Tom,

    Sure, I can explain further

    The number we return from the function is what is important. This number will override all capacities.

    return 3;

    By default, Appointments+ will calculate this as Service Capacity minus available service providers. This function will allow us to simply say that there will always be three slots available to book, even though we have one service provider

    "Please also note that this is a kind of "hack" and when you have more than one service provider, this function may not work as expected in regards to working hours, as "virtual" providers will not be bound to working hours of existing providers."

    This is a warning that this code snippet isn't a fix all. Otherwise it would probably be included as an add-on. This is more of a workaround, that would only work if you have one service provider assigned to the service.

    Best regards,

  • Tom

    Hi,

    I did as you wrote and here is what happened: only one appointment on specific time slot for a chosen provider is available (time slot is booked). I tried with and without the code you pasted few posts before and result is the same.

    Anyway, I think it is not the biggest problem I have. If I understand your previous post correctly, Appointment+ is not able to serve for my ski school at all. Let me give you an example and please tell if I'm right:
    - next Thursday from 9 to 12 a.m. four teachers are having their classes simultaneously (they are available),
    - each of them can serve for up to 3 clients,
    - with A+ I can provide on-line appointments only for one teacher (if I manage to solve the problem with capacity mentioned at the beginning of this message).

    Regards

  • Alexander

    Hi @Tom,

    I'm afraid you are right. Based on the requirement you just posted, sadly this isn't possible with Appointments+ right now.

    From it's design, Appointments+ is meant for each "appointment" time slot to work for one person - after that it becomes unavailable. The filter hook gives us a crude way to override this, but it doesn't change the underlying functionality, so it's limited.

    One thing you could try, is to create 4 separate services, and only assign 1 teacher to each service. This would prevent multiple providers per service, and should allow the workaround to function.

    Unfortunately the only other way to have multiple users book the same time slot for a service without multiple providers, is to use the dummy service providers.

    Best regards,

  • Daniel

    I'm having a similar problem. Why isn't Appointments suited to education? A single "service provider", i.e. teacher, can serve multiple customers at once. It should be designed with the ability to override the capacity=service providers limitation.

    There are other points which make this unsuitable for education too. For example recurring bookings for regular weekly lesson times - this doesn't seem so difficult to implement and quite a common thing when booking a service (not just in education).

  • Alexander

    Hi @Daniel,

    Would you mind opening up a new thread for this? That way we don't miss anything, and can be courteous to the users above. This way they won't be receiving post notifications from our conversation - long after the topic was originally raised.

    It's also easier for us to keep track of newer threads.

    You can start a new topic here: https://premium.wpmudev.org/forums/#question

    Thanks.