appointments+

Is there a way that I can have a service that selects 2 service providers?

  • Hakan

    Hi,

    Of course that is possible. Assign your providers to that service using "Services provided" column of "Service Providers" tab. Then free number of appointments for a particular time slot will be defined by the number of providers giving that service provided that they are working and not busy at that time slot.

    More complex assignments are possible: For example, Provider 1 and 2 serving for Service A and Provider 2 additionally serving for service B (but not provider 1).

    Or do you mean something else?

    Cheers,
    Hakan

  • Hakan

    It is possible to duplicate an appointment depending on a certain service:

    function assign_2_providers( $app_id ) {
    global $wpdb, $appointments;
    $app = $wpdb->get_row( "SELECT * FROM " . $appointments->app_table . " WHERE id=$app_id " );
    // Replace 2 with your real service ID
    if ( 2 != $app->service )
    return;
    $wpdb->insert( $appointments->app_table, array( 'created'=>date ("Y-m-d H:i:s", $appointments->local_time ),'name'=>$app->name, 'service'=>$app->service, 'start'=>$app->start, 'end'=>$app->end, 'note'=>'Couple for ' . $app_id ));
    }
    add_action( 'app_new_appointment', 'assign_2_providers' );

    If you add these codes in functions.php of your current theme, it will duplicate the appointment for service with ID 2 and client will not get duplicate emails (The second one will be a kind of supplement to the original appointment). So 2 available workforce for that time slot will be occupied.

    Unfortunately this doesn't solve the issue as it will not check that you actually need 2 providers to handle that service, *before* applying for the appointment. So, if you have only 2 providers and 1 provider is already busy for another service, A+ will still show that time slot free for couple massages service.

    As a result we don't have a complete solution for this application.

    Cheers,
    Hakan

  • aecnu

    Greetings rwhoski,

    Welcome to WPMU DEV!

    With the lead developers response above, it appears this particular topic is now resolved/closed, if you need any further assistance please let us know.

    If it wasn't resolved, or you have any more questions related to this thread, please feel free to post them below including any new symptoms or errors and tick the 'Mark as Not Resolved (re-open)' box below the post area (or else we'll miss it!)

    Thank you for being a WPMU Dev Community Member!

    Cheers, Joe

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.