Appointments+ Not Working for Week View

Since Appointments+ version 2.2.1, the week view only displays the first time slot for the week. I did a live chat with a support rep who verified this. He said he'd report it to the developers. When can I expect this to work again?

  • Ash
    • WordPress Hacker

    Hello Paul

    I can see the issue is fixed in our system and waiting to be released very soon, of course after QA formalities.

    I have also been informed that James (the staff you chatted to) sent you an email providing a temporary fix as a workaround that you can use for now. Once you get an update notification, update your plugin :slight_smile:

    Also let me know if you didn't receive any email from James regarding the solution.

    Have a nice day!

    Cheers,
    Ash

  • James Morris
    • WordPress Enthusiast

    Hello Paul,

    Seems we got lost in communication somewhere. :disappointed:

    Attached, you will find a file that should resolve this issue for you. I've tested it on my own install and it worked well.

    Please download helpers.zip and extract the included php file.
    Login via FTP to your site and navigate to ./wp-content/plugins/appointments/includes
    Rename the old helpers.php file to old.helpers.php
    Upload the new helpers.php file

    This should take care of this issue for you. This patch should be included in the next version of Appointments+. Therefore, there will be no need to re-apply this patch after updating.

    Let us know if you have any further questions. We'll be happy to help! :slight_smile:

    Best regards,

    James Morris

  • Paul
    • Site Builder, Child of Zeus

    Thanks, James. At first glance it appears to be working... However, the internal "Durations" calculations do not work for some reason. I have set the "duration" to 60 min., having 30 min. appointment slots. For Appointments+ version 2.2.0, I set "working hours" to 9:30a to 5:00p, and the calendar displays hours from 9a to 5:30p...having 9a-9:30 blocked, and 5-5:30p blocked... Which makes sense if you have a 30 min slot and you pick it, it will block the following 30 min. slot. I hope I've described this issue in an understandable way.

    I have version 2.2.0 running at http://kdunncalendar.com (support activated)
    I have version 2.2.2 running at http://brokersmap.com ...all settings are identical. (support activated)

  • Paul
    • Site Builder, Child of Zeus

    Thanks, Ash.... I just confirmed this new "Durations" issue is prior to James' modified helper.php file... So, between version 2.2.0 (which works) and 2.2.2 (currently installed). Again, I have multiple sites running Appointments+, all are using version 2.2.0, except my development site brokersmap.com.

    In addition...while testing, I set the "working hours" from 8am to 7pm... but the calendar only "still" displays 9:30am to 4:30pm. Interesting... (my browser cache is turned off, and I did dump my varnish cache from my server)

  • James Morris
    • WordPress Enthusiast

    Hello Paul,

    In order to help you best with this issue, it would be good if we could test some changes to the plugin files on your site directly. Would you please provide us with access to your site with the following info?

    Please visit the Contact page and complete the form with the following information:

    Subject: "Attn: James Morris"

    In the Message box, please provide the following:

    - link back to this thread for reference
    - any other relevant urls

    - Admin login:
    Admin username
    Admin password
    Login url

    - Hosting Control Panel Login
    Admin username
    Admin password
    Login url

    ~OR~

    - FTP credentials
    host
    username
    password
    (and port if required)

    Best regards,

    James Morris

  • Paul
    • Site Builder, Child of Zeus

    Sorry, Panos... I just toggled the "Under Construction" plugin to "off". Unless you're logged in as a user, you should have seen a green "under construction" page... Try it now. I do have iThemes Security & Ninja Firewall running...but only about 5 IPs have been permanently banned, total. Please give my site time to load...it's currently running on a very slow "shared" server (host4geeks).

  • Panos
    • SLS

    Hi Paul ,

    Thanks! I could load the site now :slight_smile:

    What I notice in your appointment page is that the start hours are correct, the duration seems to be wrong though. They are set to be 1 hour long but in the appointment page they appear to be 30 minutes.

    This has to do with the durations add-on which still supports the "Minimum time based appointment duration calculus (legacy)".

    You can set that to "Service duration based calculus", in order to fix it. If you need that option though, i have went ahead and added a mu-plugin ( a php file in the wp-content/mu-plugins folder ) with the following snippet:

    add_filter( 'app-timetable-step_increment', function( $step, $cal_type ){
    
        if( $cal_type == 'week' ){
            $step = 3600;
        }
        return $step;
    }, 10 ,2 );

    The file is called app-plus-duration-fix.php which you can remove at anytime or modify as you like.

    The snippet that file contains set the step in the weekly calendar to 1 hour so the end times appear correctly in the weekly calendar.

    In case you decide to change the "Time slot calculus method" to "Service duration based calculus" you would not be needing the file I added so you can go ahead and delete it.

    Cheers!

  • Panos
    • SLS

    There was a fix in one of the following versions for the weekly calendar. Now it respects the starting working hours of the provider and the duration of the service :slight_smile:

    The duration add-on however, provides a legacy option (Appointments > Settings > General > Time slot calculus method > Minimum time based appointment duration calculus (legacy) ) which when is enabled it forces to use the "Time base" as service duration. That is why the time-slots were lasting 30 minutes instead of 1 hour.

    Hope this helps clarify a bit! Cheers!

  • Paul
    • Site Builder, Child of Zeus

    Thanks for that info, Panos... Just to clarify... Our stated time slot is 30 minutes (30-minute phone consultation)... But the durations plugin provides the ability for an appointment to extend out for 60 minutes on the calendar... This is very useful as Kathryn does not want back-to-back phone consultations scheduled...plus a lot of the 30-minutes phone calls do go over the stated 30-minute period...so the durations is a life saver in that regards. I do see that after your work on the brokersmap.com site, that there are 60-minute time slots appearing, with the 30-minutes slots. This is not acceptable, as we want 30-minute time slots. Please review http://kdunncalendar.com, which is running version 2.2.0 of Appointments+... What are your thoughts?

    • Paul
      • Site Builder, Child of Zeus

      Update: Sorry. I just discovered I was updating the general "working hours" for "No specific provider"...when I realized I needed to select "Kathryn", I saw the wrong hours there. Once I got "Kathryn's" working hours set, the time came back, and I turned off the mu-plugins function. However, Kathryn, herself, loved the way all prior Appts+ versions had her 9am to 9:30am slot blocked, when her "working hours" starting time was set at 9:30am... and her 5:30pm to 6:00pm slot blocked, having the "working hours" ending at 5:30pm. But I do have to report that "THAT" is now what I see as different and is viewable/comparable to the old versions at http://kdunncalendar.com. But it is workable...So, thanks for your help. We can call this completed. Thanks for your help Panos & James, Ash & Kasia! : )

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.