From a7d6f20cc4759e2401ac75efc776f833e01bfb86 Mon Sep 17 00:00:00 2001 From: Korina Cordero Date: Mon, 8 Nov 2021 07:17:24 +0000 Subject: [PATCH] Commented out time check for schedule options. #637 --- src/Controller/APIController.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Controller/APIController.php b/src/Controller/APIController.php index b29df821..375794c4 100644 --- a/src/Controller/APIController.php +++ b/src/Controller/APIController.php @@ -3196,7 +3196,7 @@ class APIController extends Controller implements LoggedController $schedule_choice = true; - // TODO: remove the time check after ECQ. This will then always return true + // remove the time check after ECQ. This will then always return true // get current time $current_datetime = new DateTime(); //$current_datetime = DateTime::createFromFormat('Y-m-d H:i', '2020-04-30 17:01'); @@ -3204,8 +3204,10 @@ class APIController extends Controller implements LoggedController // get the hour $hour = $current_datetime->format('G'); - if (($hour < 8) || ($hour > 16)) - $schedule_choice = false; + // commenting out the time check since we can now book 24/7 + // this will get uncommented out if and when ECQ will kick in + //if (($hour < 8) || ($hour > 16)) + // $schedule_choice = false; // add checking if customer has a pre-registered hub $cust = $this->session->getCustomer(); @@ -3227,6 +3229,9 @@ class APIController extends Controller implements LoggedController } } + // schedule_choice will always be true aka customer can opt to + // Book Now or Schedule Order EXCEPT if customer has customer tag promo + // or ECQ comes back $data = [ 'display_schedule_choice' => $schedule_choice, ];