• Resolved Fbonnet

    (@fbonnet)


    Hi,
    I’ve set several times off (one or two for each day of the week) repeated weekly (for Monday to Friday)
    and I’ve found a problem when I want to make an appointement on Thursday :
    The calendar and the times off are ok, and on reservation window
    according the calendar, I should be able to make an appointment at 1:30PM
    on Thursday but I can’t make a reservation after 11 AM. (it’s disabled)
    These is my times of for Thursday and Friday
    Timeoff for Thursday are
    1:30 PM to 2:30 PM and 4:00PM to 7:30PM

    Timesoff for Friday are 11:AM to 4:30PM

    the times off for Tuesday and Friday seems to be merged together.
    (I’m using version 2.7.3 of Appointment Calendar)

    Here are the times off in database
    start_time end_time start_date end_date
    08:30 AM 07:30 PM 2015-03-23 2019-02-25
    09:30 AM 10:30 AM 2015-03-17 2019-01-22
    12:30 PM 04:30 PM 2015-03-17 2019-01-22
    09:30 AM 04:30 PM 2015-03-18 2019-01-30
    01:30 PM 02:30 PM 2015-09-17 2019-08-08
    04:00 PM 07:30 PM 2015-09-17 2019-08-22
    11:00 AM 04:30 PM 2015-09-18 2017-08-25

    Thanks in advance for your helps !
    Regards
    Francois

    https://wordpress.org/plugins/appointment-calendar/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi Fbonnet,

    we test it on our end with your given time off information and its work as expected.
    plz have a look in attached image image

    plz share your time off table screen shot.

    and also site url so we help you better

    Thanks
    Abhishek

    Thread Starter Fbonnet

    (@fbonnet)

    Hi Abhishek
    thanks a lot for your test.
    This is a screen shot for my time off table
    http://postimg.org/image/t38y6hwgl/
    and a screen shot of the appointement window
    http://postimg.org/image/rdsx85ckz/
    and also the url where you can test the pb for Thursday
    http://s534863374.onlinehome.fr/tests/reservation/

    Thanks in advance
    Francois

    Hi Fbonnet,

    yes this is small issue. Thanks for mention this.

    let me one thing you are familiar with php code you can resolved it with your self we will instruct you

    Thanks
    Abhishek

    Thread Starter Fbonnet

    (@fbonnet)

    Hi Abhishek
    thanks for your help.
    I’m familiar with php code.
    I think it can be solved with adding this : order by cast(start_date as datetime) asc
    in the “Fetch All ‘WEEKLY’ tim-eoff and calculate disable slots” query in
    appointment-calendar-shortcode.php
    but maybe I’m wrong ?

    Thanks
    Francois

    Hi Fbonnet,

    you can use this given code it will resolved you time-off issue

    1. Open appointment-calendar-shortcode.php
    2. go to line number 867 or after the closing if in-array condition paste given line

    $AllEventWeelylyDates = null;

    3. open menu-pages folder given in you plugin directory
    4. open time-slots-calculation.php file and go to line number 251 or after the closing if in-array condition paste given line

    $AllEventWeelylyDates = null;

    let me know did it work

    Thanks
    Abhishek

    Thread Starter Fbonnet

    (@fbonnet)

    Thanks a lot Abhishek.
    I’ve put your code into this two files and it works fine now.
    My problem is solved.
    Thank you again for your help and efficiency!
    Francois

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Problem with 2 times Off in the same day (repeat Weekly)’ is closed to new replies.