Commented out time check for schedule options. #637

This commit is contained in:
Korina Cordero 2021-11-08 07:17:24 +00:00
parent 4d66345ae3
commit a7d6f20cc4

View file

@ -3196,7 +3196,7 @@ class APIController extends Controller implements LoggedController
$schedule_choice = true; $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 // get current time
$current_datetime = new DateTime(); $current_datetime = new DateTime();
//$current_datetime = DateTime::createFromFormat('Y-m-d H:i', '2020-04-30 17:01'); //$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 // get the hour
$hour = $current_datetime->format('G'); $hour = $current_datetime->format('G');
if (($hour < 8) || ($hour > 16)) // commenting out the time check since we can now book 24/7
$schedule_choice = false; // 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 // add checking if customer has a pre-registered hub
$cust = $this->session->getCustomer(); $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 = [ $data = [
'display_schedule_choice' => $schedule_choice, 'display_schedule_choice' => $schedule_choice,
]; ];