decke wand boden Wohnfachmarkt
unread,May 27, 2024, 11:22:34 AMMay 27Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Easy!Appointments - Support Group
Hello dear community, I have a problem and hope you can help me.
When an appointment is booked, the provider/customer/EMAIL/phone information can be seen in the easy calendar.
However, this information is not included when syncing with Google.
I have already found the Google_sync.php file.
Here the function is created in lines 153 to 192. Unfortunately, I'm not a programmer and don't understand what information I have to enter here so that the data is transferred to the notes section of my Google Calendar.
I hope you can help me. This is the code area that I was able to identify:
public function add_appointment(
array $appointment,
array $provider,
array $service,
array $customer,
array $settings,
): Event {
$event = new Google_Service_Calendar_Event();
$event->setSummary(!empty($service) ? $service['name'] : 'Unavailable');
$event->setDescription($appointment['notes']);
$event->setLocation($appointment['location'] ?? $settings['company_name']);
$timezone = new DateTimeZone($provider['timezone']);
$start = new Google_Service_Calendar_EventDateTime();
$start->setDateTime(
(new DateTime($appointment['start_datetime'], $timezone))->format(DateTimeInterface::RFC3339),
);
$event->setStart($start);
$end = new Google_Service_Calendar_EventDateTime();
$end->setDateTime((new DateTime($appointment['end_datetime'], $timezone))->format(DateTimeInterface::RFC3339));
$event->setEnd($end);
$event->attendees = [];
$event_provider = new Google_Service_Calendar_EventAttendee();
$event_provider->setDisplayName($provider['first_name'] . ' ' . $provider['last_name']);
$event_provider->setEmail($provider['email']);
$event->attendees[] = $event_provider;
if (!empty($customer['first_name']) && !empty($customer['last_name']) && !empty($customer['email'])) {
$event_customer = new Google_Service_Calendar_EventAttendee();
$event_customer->setDisplayName($customer['first_name'] . ' ' . $customer['last_name']);
$event_customer->setEmail($customer['email']);
$event->attendees[] = $event_customer;
}
// Add the new event to the Google Calendar.
return $this->service->events->insert($provider['settings']['google_calendar'], $event);
}