Added customer data in the book success page

This commit is contained in:
Alex Tselegidis 2020-12-14 20:40:56 +02:00
parent 442ba83296
commit 5512731c41

View file

@ -267,6 +267,8 @@ class Appointments extends EA_Controller {
$appointment = $appointments[0]; $appointment = $appointments[0];
unset($appointment['notes']); unset($appointment['notes']);
$customer = $this->customers_model->get_row($appointment['id_users_customer']);
$provider = $this->providers_model->get_row($appointment['id_users_provider']); $provider = $this->providers_model->get_row($appointment['id_users_provider']);
$service = $this->services_model->get_row($appointment['id_services']); $service = $this->services_model->get_row($appointment['id_services']);
@ -285,6 +287,13 @@ class Appointments extends EA_Controller {
'email' => $provider['email'], 'email' => $provider['email'],
'timezone' => $provider['timezone'], 'timezone' => $provider['timezone'],
], ],
'customer_data' => [
'id' => $customer['id'],
'first_name' => $customer['first_name'],
'last_name' => $customer['last_name'],
'email' => $customer['email'],
'timezone' => $customer['timezone'],
],
'service_data' => $service, 'service_data' => $service,
'company_name' => $company_name, 'company_name' => $company_name,
]; ];