From 5512731c4103b8d654b953edc12c822f51e9f578 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Mon, 14 Dec 2020 20:40:56 +0200 Subject: [PATCH] Added customer data in the book success page --- application/controllers/Appointments.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/application/controllers/Appointments.php b/application/controllers/Appointments.php index 38ef8926..ff6c6b4f 100755 --- a/application/controllers/Appointments.php +++ b/application/controllers/Appointments.php @@ -267,6 +267,8 @@ class Appointments extends EA_Controller { $appointment = $appointments[0]; unset($appointment['notes']); + $customer = $this->customers_model->get_row($appointment['id_users_customer']); + $provider = $this->providers_model->get_row($appointment['id_users_provider']); $service = $this->services_model->get_row($appointment['id_services']); @@ -285,6 +287,13 @@ class Appointments extends EA_Controller { 'email' => $provider['email'], '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, 'company_name' => $company_name, ];