Setting appt times with 10 break

Hi,
Was wondering if it is possible to have appointments every 60 minutes, but the appointment is 50 minutes with a 10 minute break between. Is there a way to set that up?

  • pxwm

    Hi @reikob

    Yes you can achieve this by:-

    Login to your Wordpress dashboard as Admin
    Then Select A+ settings
    Then Select the 'Working Hours' tab
    Then Select each 'Service Provider' from the dropdown
    Then set the 'Work?' to 'Yes' for the relevant working days
    Then set the 'Break?' field to 'Yes' for the relevant working days
    Then set a single Break start and end time for each working day
    Then Save
    On saving you will then notice a blue '+' sign to the right of the Break times.
    Click on this and it will display a new Break line for you to add an extra Break.
    Keep clicking the blue '+' for each Multiple Break.
    I would suggest you set the Break times in chronological order and if you happen to set too many Breaks so have to set any 'Break?' fields to 'No' make sure you set the start and end times so they are outside of the Service Provider's working day as there is currently a bug in v1.3.1 in respect to Multiple Breaks.
    Then Save
    Then repeat for each Service provider.
    Unless you are using the Working day settings for the 'no specific provider' then make sure these are set to 'No'.

    I hope this helps
    Regards
    SteveB

  • reikob

    HI,
    Confused. I had set the time base in general settings to 60 minutes, when that is set, then my working hours are all there (9-5 Mo-Th) and the break time 12p-1p, but I can't add any break times less than 1 hour. I just need 10 minutes.

    When I change the time base in general settings to 50 minutes (added it by using additional time base) I loose my working hours settings, and the time increments start at 12am, next app 12:50am,
    Can't make the hours 9-5, only 9:10a to 4:40p or 5:30p.

    So not working the way you are suggesting.

  • pxwm

    Hi @reikob

    Can you try setting the 'Time period' to 10mins and this should allow you to set 10min Breaks.

    However this will mean that your available slots in your schedule will show 10mins so it will mean a Service could be booked in 10min slots.

    There is another way to achieve this but you would have to add some bespoke code to your themes.php file.

    I suggest initially you try setting the 'Time period' to 10mins and see if this is acceptable.

    I hope that helps
    Regards
    SteveB

  • pxwm

    Hi @reikob

    I've included the bespoke code that needs to be added to your functions.php file (part of your theme)

    First I would recommend you take a backup of your site and the database so you have a rollback option

    Then Login to your Wordpress dashboard
    Then Select 'Appearance' from your left hand menu
    Then Select 'Editor'
    Then Select the 'Theme Functions (functions.php)' file from the right hand list of files
    Scroll to the very bottom of your code, where there should be a php closure tag '?>'
    Place the following code directly above this tag and after all the other code:-

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

    Then click the 'Update File' button.
    It should indicate that the file has been successfully saved

    Then Select the A+ Settings
    Then Select the 'General' tab and set the 'Time slot calculus method' field to 'Service duration based calculus'
    Then Save

    Then Select the 'Working Hours' tab
    Then Select the 'no specific provider' and Set all the 'Break?' field to 'No'
    Please Note: If you have set any of the days as Multiple Breaks can you set the start and end times so they are outside of the Working Hours otherwise A+ will still use these times even though the fields are set to 'No'.
    Then Save

    Then Select the 'Services' tab
    Then set the 'Services' duration to 60mins.
    Then Save

    Can you then try making an appointment and the schedule should show hourly slots and when you select one the confirmation form should show the Service duration as 50mins.

    Regards
    SteveB

  • pxwm

    Hi reikob

    Please Note: Just added a suggestion in your other post re: Synchronising A+ and your Google Calendar

    Good news.

    To confirm with v1.3.1 the default settings are 'Service duration based calculus' and this is why it is working as requested, so good news.

    To confirm you can set a lunch break by setting the relevant 'Break?' fields in your 'Working Hours' tab.

    However before you do I'm sure the problem you are having with the Google calendar times not showing in the A+ schedule is due to the fact that you haven't created your single Service Provider and assigned them to the 'Service'.

    There is a way you can create a single Service Provider, assign them to the single 'Service' and then 'force' the schedule to show the available time slots without having to select the 'Service Provider' from the dropdown.

    Could you please try the following to see if this helps with the Google Calendar problem and will also allow you to set lunch breaks:-

    Login to your Wordpress dashboard
    Select A+ Settings
    Select 'Service Provider' tab
    Create the single 'Service Provider and assign them to the single Service.
    Make a note of the 'Service Provider 'ID'
    Then Save

    Then Select your Appointment page and revise the following shortcode

    From: [app_services]
    To: [app_services worker="x"]
    Replacing the 'x' with the 'Service Provider' ID

    Then remove the shortcode: [app_service_providers]
    Then 'Update' the page

    Then Select the 'Working Hours' tab
    Select 'no specific provider' from the dropdown
    Make a note of all the 'Work?' field set to 'Yes' and the Start and End Times
    Then set the 'Work?' fields to 'No' so they all show 'No'
    Then Save
    Then select the 'Service Provider' you created from the dropdown
    Then set the relevant 'Work?' fields to 'Yes' and the Start and End times.
    Then set the relevant 'Break?' fields to 'Yes' and set the Start and End times.
    Then Save.

    Then try making an appointment and see if the Break times are blocked out in the schedule and also if the Google Calendar times block out the time slots in the front end.

    Please Note: This may take approx 15mins to take place unless you Select the A+ 'Google Calendar' tab and click the link called 'Import and Update Events Now' and it should synchronise your Google calendar with A+.

    In the meantime I'll check the settings in your A+ 'Google Calendar' tab as per your other post:-

    https://premium.wpmudev.org/forums/topic/how-does-the-google-calendar-sync#post-526996

    Regards
    SteveB

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.