Appointments + Google Calendar API syncronisation

Hi,

We are using the Appointments + plugin to keep a single Google Calendar in sync with the Wordpress site.

It seems to work fine when adding appointments but when we delete an appointment either from the plugin or Google calendar it does not remove the appointment from the other.

Is this behaviour expected or is it a bug?

Is there anyway this can be resolved?

Regards
SteveB

  • pxwm

    Hi Patrick,

    As requested we have tested on a demo website with the Twenty Eleven theme and no plugins installed except Appointments +.

    We tested using version 1.2.2 and then upgraded to the latest version 1.2.3.2

    We have tested using a single Service provider and making an appointment.

    This updated the Google calendar immediately.

    We then went into the backend of the website and deleted the appointment.
    This removed the appointment from the website but it remained in the Google calendar.

    We then did the same but deleted in the Google calendar first but the appointment remained in the website.

    We waited 10 minutes but still the same.

    Any ideas?

    Regards
    SteveB

  • pxwm

    Hi Hakan,

    Many thanks.

    As requested we have fully tested with the just a single calendar using 'no preference' and also with 2 x 'service provider' calendars with their own api keys and set to syncronised.

    The good news is that it all works except for the deletion of an appointment from the Google calendar.
    When we delete the appointment from the Google calendar we have logged in to the backend to force the update and the message we receive is 'no future new events are found in your google calendar thus no events are imported and no updates and deletions made.'
    We also tested deleting the appointment from the backend and it didn't remove from the google calendar.

    We have tried disabling the plugin and re-activating but no luck.

    We have also tested using v1.2.3.3 on a demo site with the Twenty Eleven theme and no other plugins except Appointment + and still experience the same problem.

    Hope this helps with resolving

    Thanks
    SteveB

  • pxwm

    Hi Hakan,

    Many thanks for your feedback and sorry for the lengthy reply.

    I can confirm that all appointments are made from A+ and exported to the Google calendar.
    We would then like to use the Google calendar to manage the appointments for reasons explained later in the post.
    I can confirm this all works fine based on a single or multiple service providers with their own unique google calendar api key except for the deletion of an appointment in the Google calendar.

    If I have understood correctly does this mean I have to delete in A+ if I have made the appointment in A+?

    The reason I ask is because I can modify the appointment (either a new time/extended time or new date) in Google calendar and it will reflect this modification in A+ even though the appointment was made in A+ so I was hoping that I could also delete the appointment in the Google calendar and it would be removed in A+.

    Is this not the case?

    The reason I would like our client to manage appointments in the Google calendar is:-

    1. They make all appointments on behalf of their customers as they initially don't want to allow their customers to make direct appointments.
    2. They do this by logging in to their Wordpress profile and then we have setup a 'Book Now' page that displays all the services they offer with an appointment button for both service providers for each service.
    3. They can select the relevant service by clicking one of two service provider buttons and it auto populates the services and service provider field in the appointments page.
    4. They then populate the appointment form with their customers details and submit the appointment which then populates the A+ calendar and Google calendar and all works fine.
    5. The reason we would like to use the Google calendar to manage the appointments that have been created in A+ is because we have found that when our client goes into the backend to make any changes to any appointments ALL the appointments they have made through their Wordpress profile show with the details of the last customer they made an appointment for.

    e.g. Last appointment made in A+ customer name: Fred Bloggs, email fredbloggs@host.com, phone #0123456789

    All the appointments made all show the above details.

    If the functionality of A+ only allows us to delete appointments through A+ and not the google calendar is there a way of our client using their Wordpress profile to make appointments but each appointment correctly shows the 'real' customer details for each appointment?

    I hope this helps resolve the problem we are experiencing and if you require further information please let me know.

    Regards
    SteveB

  • Hakan

    Hi delmod and pxwm,

    Please write in your own topics, because your cases and settings may be different and I do believe they are completely different. I read all of them, so you don't need to write them in the other topic again. It is more confusing like this.

    @pxwm,

    If I have understood correctly does this mean I have to delete in A+ if I have made the appointment in A+?

    Yes. Deleting an event in GCal created by A+ will not delete an appointment, because that appointment belongs to A+ in the first place. You should delete it in A+ which will remove it from GCal too.

    Deleting an event in GCal would only delete the "reserved" appointments, because they belong to GCal. However in your case this will have no effect, because you are not using sync mode and you don't have any reserved appointments, if I am not wrong.

    The reason we would like to use the Google calendar to manage the appointments that have been created in A+ is because we have found that when our client goes into the backend to make any changes to any appointments ALL the appointments they have made through their Wordpress profile show with the details of the last customer they made an appointment for.

    e.g. Last appointment made in A+ customer name: Fred Bloggs, email fredbloggs@host.com, phone #0123456789

    You are mentioning about a very different and special case here. To clear the previously saved cookies may simply do this. Or why don't you simply use another browser where you are not logged in? Why do you need GCal for this BTW?

    If the functionality of A+ only allows us to delete appointments through A+ and not the google calendar is there a way of our client using their Wordpress profile to make appointments but each appointment correctly shows the 'real' customer details for each appointment?

    I am lost here. Some person is entering an appointment on behalf of another person and you want to show whose details where?

    I think you are trying to do something which requires some custom coding.

  • pxwm

    Hi Hakan,

    Many thanks for your reply.

    1. I can confirm:-
    a. we have the GCAL settings as syncronisation
    b. all appointments are made in A+
    c. All appointments are automatically confirmed
    d. All appointments are made by our client on behalf of their customers by logging in to their Wordpress profile

    2. I've just read your reply to the other post and I now fully understand why you can modify a 'confirmed' appointment made in A+ but NOT delete and I will try your suggestion of granting the service providers 'manage_options' capability.

    3. As for the other issue: We will try the refresh option you have suggested and will let you if this works.

    However to confirm our client initially wants to make all appointments on behalf of their customers and they do this by logging in to their Wordpress profile. This is when we noticed that when you log-in to the Admin backend to delete an appointment in A+ ALL appointments show the details of the last customer our client made an appointment for.
    We do have one possible way forward and would appreciate if you could comment:-

    1. Way forward - Set the 'Book Now' and 'Appointment' pages so our client has to log-in to view these two pages but not via their Wordpress profile. Do you think this would resolve our problem or do you think this is still a caching issue?

    Regards
    SteveB

  • Hakan

    However to confirm our client initially wants to make all appointments on behalf of their customers and they do this by logging in to their Wordpress profile. This is when we noticed that when you log-in to the Admin backend to delete an appointment in A+ ALL appointments show the details of the last customer our client made an appointment for.

    To clarify, your client Mr. A makes an appointment on behalf of his customer Mr.B and when he logs in he sees Mr B.'s details in the confirmation form is that right?

    If this is the case that is the expected behavior.

    Why dont he just make the appointment on another browser where cookies are disabled and he is not logged in?

  • pxwm

    Hi Hakan,

    To confirm this is what happens:-

    Client Mr A logs-in to their Wordpress profile

    Client Mr A then makes an appointment for Mr B

    Client Mr A then makes an Appointment for Mr C

    Client Mr A then wants to delete Mr B and logs in to Wordpress Admin and the appointment for Mr B shows Mr Cs details.

    I'm assuming when you say "Why dont he just make the appointment on another browser where cookies are disabled and he is not logged in?"

    If I have understood correctly wouldn't this mean that anyone could access the appointments page and make an appointment. If I'm correct then we only want our client to have access to the appointments page.
    As mentioned in the previous post could we just 'hide' the appointments page via a log-in script but NOT the clients Wordpress log-in?

    Regards
    SteveB

  • Hakan

    Mr. A naturally sees those appointments in his account because he made those appointments when he is logged in.

    Appointments are saved to the account of the one who was logged in and made an appointment on the front end. There is nothing like "I am Mr A, but this is not me, save it as Mr. B's appointment". How can be this possible?

    By the way those appointments will also be saved in a cookie.

    So my solution is valid for this part:

    Why dont he just make the appointment on another browser where cookies are disabled and he is not logged in?

    However:

    Client Mr A then wants to delete Mr B and logs in to Wordpress Admin and the appointment for Mr B shows Mr Cs details.

    This will not work unless Mr A is admin (or he has manage_options capability). Only admin can delete an appointment. And If he is admin, why would you need such complex solutions? He can manually add appointments on the admin side with whatever client name and details he wants.

    Plus regarding this:

    If I'm correct then we only want our client to have access to the appointments page.

    I think you should grant manage_options capability to Mr.A or simply assign him as admin and he needs to enter appointments from admin side.

  • pxwm

    Hi Hakan,

    Many thanks for all your feedback and advice on this subject.

    To confirm we have resolved by:-

    1. Creating a page password for the 'Book-Now' and 'Appointments' page without our client having to log-in to their Wordpress profile.
    We have tested and this allows them to make appointments for their customers and when we check the backend through Admin it has recorded the correct details for each customer.

    2. To delete a 'confirmed' appointment made in A+ we will either give our client Admin access or use manage_options.

    Again many thanks for all your help on this and I have marked as resolved.

    Regards
    SteveB

  • Kloshar

    Can someone tell me what am I to do in order to have details passed to google cal correct, when I do Test Connection, it works with all the details, Title of the event as well.
    Client Name: Test client name
    Phone: Test phone
    Email: *******@gmail.com
    Service Name: Booking London Apprentice
    Service Provider Name: Our staff

    Note:This is a test appointment inserted by Appointments+

    But when I do a real one, I get (No Title) and no details are embeded into Description filed of the gmail calendar.

    please help!

    B

  • pxwm

    Hi,

    If you have only set up the main google calendar settings then select the 'Google calendar' tab in the A+ settings.

    Then scroll down to the 'Event summary (name)' field and enter say SERVICE appointment. This will add the service that has been booked and the word appointment to the google calendar title.

    Then in the field below called 'Event description' enter say:-

    Client Name: CLIENT
    Service Name: SERVICE
    Service Provider Name: SERVICE_PROVIDER

    This will populate the description in google calendar with the client name, the service and the service provider name.

    If you have also created google calendars for each service provider then you will need to log-in to the Wordpress dashboard as that user and select 'Profile' on the left and scroll down and you will see the same fields and you will need to populate these.

    Hope this helps
    Regards
    SteveB

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.