How to have some appointments start at 0X:15am some days and others 0X:00am?

My client requires appointments for a service provider to be staggered like this:

1) Monday they start at 9:15am and are 30 minutes in length each throughout the day

2) Tuesday they start at 10am and are 30 minutes in length each throughout the day

3) Wed/Thur/Fri varies (some weeks the start is 9:15am and some weeks 10am).

Is there any way to accomplish this? I've set the "time base" for 30 and the "additional time base" for 15 and selected each but, for some reason, when I select the 15 the appointments are suddenly 45 minutes in length?

Scratching my head and can't figure it out yet.

  • Hakan
    • The Incredible Smush

    Hi,

    A+ does not support such special cases of the shelf, however it has several hooks that can be used for customization.

    Obviously your case requires some customization and special coding. I am writing these just as samples. It may not exactly suit your needs:

    Changes 9:15am as starting time for the schedule:

    // Force starting time as 9:15
    function my_new_starting_hour( $start ) {
    	return 9.25;
    }
    add_filter( 'app_schedule_starting_hour', 'my_new_starting_hour' );

    Disables 9am appointments for Tuesday (The first appointment starts at 10:15 though):

    function add_more_breaks( $is_holiday, $ccs, $cce, $service, $worker ) {
    	if ( 'Tuesday' == date( 'l', $ccs ) && '9' == date( 'G', $ccs ) )
    		return true;
    	return $is_holiday;
    }
    add_filter( 'app_is_holiday', 'add_more_breaks', 10, 5 );

    3) Wed/Thur/Fri varies (some weeks the start is 9:15am and some weeks 10am).

    You have to define what "some weeks" are. Then you can modify the above codes including those weeks.

    I hope this helps.

    Cheers,
    Hakan

  • Hakan
    • The Incredible Smush

    And this one makes appointments start on 10:00 instead of 10:15 for Tuesdays:

    // Subtract 15 minutes for Tuesday
    function subtract_15_min( $ccs ) {
    	if ( 'Tuesday' == date( 'l', $ccs ) )
    		return ( $ccs - 900 );
    	else
    		return $ccs;
    }
    add_filter( 'app_ccs', 'subtract_15_min' );

    Note: You need to use Monthly Schedule only, because for weekly schedule there will not be a common time column.

    Cheers,
    Hakan

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.