private function getAvailability($ids) { $minRates = array(); try { if ($ids) { $minRates = $this->reservitUtils->getAvailability($this->searchData->datePax, $ids); } } catch (\Exception $e) { $this->errors[] = 'search.results.error.reservit'; $this->logger->err($e->getMessage()); } return $minRates; }
/** * @param BookingUserSelection $booking * @param DatePaxData $datePax */ public function initializeBookingFromSearch(BookingUserSelection $booking, DatePaxData $datePax) { $hotel = $this->getHotel(); $langContext = $this->context->get('language'); $brandContext = $this->context->get('brand', true, strtolower($hotel->getBrand()->getArtsysID())); $requestorId = $brandContext['parameters']['requestor.id']; if ($this->context->get('brand') != strtolower($hotel->getBrand()->getArtsysID())) { $requestorId = 0; } $parameters = array('lang' => $langContext, 'requestor.id' => $requestorId); if ($code = $datePax->getPromoCode()) { $parameters['promoCode'] = array('exclusive' => true, 'code' => $code); } $hotelAvailData = $this->reservitUtils->requestHotelAvailData($datePax, $hotel->getReservitId(), $parameters); if ($code && $hotelAvailData->hasWarning('U03.RIT')) { $booking->setPromoCodeError(true); } else { $booking->setPromoCodeError(false); } $booking->setHotelAvailData($hotelAvailData); $booking->setDatePaxData($datePax); $booking->initRoomsList(); $booking->initSelectedRooms(); }