Booking 60 minute appointments every 30 minutes - multiple clients can be facilitated at once with o

I need to be able to book clients for 60 minute sessions starting every 30 minutes. In the business, one service provider can facilitate two clients simultaneously in separate rooms. The single service provider wants clients to be coming in at 30 minute intervals for 60 minute appointments instead of two clients coming in at the same time for 60 minute appointments.

For example:
Client A comes in at 9am for a 60 minute appt.
Client B comes in at 930am for a 60 minute appt.
Client C comes in at 10am for a 60 minute appt.
Client D comes in at 1030am for a 60 minute appt.

In this setup, there are always two clients in the office (starting at 930), but they come in at 30 minute intervals.

The problem is that if I set the duration of the only offered service to 60 minutes, clients can only book every 60 minutes. How can I set it up so clients can book 60 minute appointments, but the appointments start at 30 minute intervals?

Above all, I need the clients to know they will be getting 1-hour appointments, but allow the appointments to be booked every 30 minutes.

If it cannot be solved functionally, the best resolution I can see is making the duration of the service 30 minutes - but making sure that clients understand the appointment will actually be 60 minutes. See attached screenshot - I would need the section next to the arrow to always say the appointment lasts 60 minutes, although the duration in the admin side shows 30 minutes. That way, the e-mails received by the client would simply show the start time of the appointment (no duration), and can be customized to say the appointment lasts an hour.

I would prefer to find a functional solution to the issue, rather than just changing the information form to always say the appointment lasts 60 minutes.

  • PC

    Hey there,

    Thanks for posting on the forums.

    The problem is that if I set the duration of the only offered service to 60 minutes, clients can only book every 60 minutes. How can I set it up so clients can book 60 minute appointments, but the appointments start at 30 minute intervals?

    What is the Time base (minutes) set in the settings >> General ?

    It should be set to 30 minutes if you want the slots to start every 30 minutes.

    Can you kindly try that first ?

    Also, you will need to create a dummy service provider to suit that purpose and assign it to your main service provider.

    You can start your main provider work timing at 0900 and the dummy can start at 0930

    Please advise if that works out.

    Cheers, PC

  • pxwm

    Hi @PC - I hope you don't mind me chiming in

    Hi @porkcharsui1gta

    If I've understood your requirement correctly you may wish to try the following:-

    IMPORTANT - Take a backup of your site and database so you have a rollback option.
    If you are using your own theme you may also wish to revert to the default theme, Twenty Twelve, just to make sure it works with this first.

    To Note:-

    This will only work if you have 1 x 'Service Provider' and 1 x 'Service'
    And if the appointment slots start on the hour.

    Then change the duration of each 'Service' From 60mins to 30mins
    Then Select 'Appearance' in the left hand menu
    Then Select Editor
    Then Select 'Theme Functions - (functions.php)'
    Then scroll down to the bottom of the code and you should see the tag '?>', denoting the end of the php code.

    Insert the following bespoke code directly above the ' '?>' tag

    function modify_duration_text( $text, $duration ) {
    
    if ($duration == 30) {
        return ($duration +30) . ' minutes';
    }
    }
    add_filter('app_confirmation_lasts', 'modify_duration_text', 10, 2);

    This will book appointments in 30min slots but will show 60mins on the confirmation form.

    Please try making an appointment to ensure it only blocks out 30mins but shows 60mins on the confirmation form.

    If it does I then suggest you make some appointments and check in the A+ backend to make sure the appointments are being recorded correctly.

    I hope this helps
    Regards
    SteveB

  • porkcharsui1gta

    Hi there,

    Thanks again for the help. This was successful, but with a caveat. You guys rock!

    Read below for FYI/question.

    At first, I tried adding the code above the "<?php }" as that was the only instance that was similar to the code you mentioned to be at the end of the sheet. Adding it above the very last line of code did not work, and also adding it before the last "?>" in this line of code:

    esc_html(get_option($shortname.'_color_footerlinks')); ?> }
    </style>

    did not work. This is the last line before the <?php } at the end of the sheet.

    I added the code somewhere in the middle of the sheet in a logical place, and then it worked.

    These are the last 20 or so lines of code. I would like to add it to the right place to avoid future issues. Where can I add it properly?

    ______________________________________________

    function et_epanel_custom_colors_css(){
    global $shortname; ?>

    <style type="text/css">
    #container { color: #<?php echo esc_html(get_option($shortname.'_color_mainfont')); ?>; }
    #left-inside a { color: #<?php echo esc_html(get_option($shortname.'_color_mainlink')); ?>; }
    #pages ul li a:link, #pages ul li a:visited, #pages ul li a:active, #categories ul li a:link, #categories ul li a:visited, #categories ul li a:active { color: #<?php echo esc_html(get_option($shortname.'_color_pagelink')); ?>; }
    #pages ul li a:hover, #categories ul li a:hover { color: #<?php echo esc_html(get_option($shortname.'_color_pagelink_active')); ?>; }
    h1, h2, h3, h4, h5, h6, h1 a, h2 a, h3 a, h4 a, h5 a, h6 a { color: #<?php echo esc_html(get_option($shortname.'_color_headings')); ?>; }

    #sidebar a { color:#<?php echo esc_html(get_option($shortname.'_color_sidebar_links')); ?>; }
    #footer { color:#<?php echo esc_html(get_option($shortname.'_footer_headings')); ?> }
    #footer a, #footer a:visited { color:#<?php echo esc_html(get_option($shortname.'_color_footerlinks')); ?> }
    </style>

    <?php }

    _________________________________________________________

    What's the best place?

    Thank you very much for the help!

    Brandon

  • PC

    Hey there,

    Glad to see that it works fine :slight_smile: Points to Steve :slight_smile:

    If you want to modify a code and keep it future proof, then you can use Child themes so that if there is any main theme update, you can simply update the main theme and the child theme remains intact.

    Or you can add filters as a new plugin and install them on your site.

    If a core file is modified, putting the code at the right place is important. Generally its put at the end of your functions.php

    Something like :

    <?php
    
    existing code
    
    <?php
    
    new code you pasted
    
    ?>

    Cheers, PC

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.