本文整理汇总了PHP中BFCHelper::parseJsonDate方法的典型用法代码示例。如果您正苦于以下问题:PHP BFCHelper::parseJsonDate方法的具体用法?PHP BFCHelper::parseJsonDate怎么用?PHP BFCHelper::parseJsonDate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BFCHelper
的用法示例。
在下文中一共展示了BFCHelper::parseJsonDate方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
<br />
<?php
foreach ($this->items as $rating) {
?>
<?php
$creationDateLabel = "";
if (isset($rating->CreationDate)) {
$creationDate = BFCHelper::parseJsonDate($rating->CreationDate, 'Y-m-d');
//$creationDate = DateTime::createFromFormat($formatDate,BFCHelper::parseJsonDate($rating->CreationDate,$formatDate));
$jdate = new JDate($creationDate);
// 3:20 PM, December 1st, 2012
$creationDateLabel = sprintf(JTEXT::_('COM_BOOKINGFORCONNECTOR_MERCHANTS_VIEW_MERCHANTDETAILS_RATING_DATE_LABEL'), $jdate->format('d/m/Y'));
}
$checkInDateLabel = "";
if (isset($rating->CheckInDate)) {
$checkInDate = BFCHelper::parseJsonDate($rating->CheckInDate, 'Y-m-d');
//$creationDate = DateTime::createFromFormat($formatDate,BFCHelper::parseJsonDate($rating->CreationDate,$formatDate));
$jdate = new JDate($checkInDate);
// 3:20 PM, December 1st, 2012
$checkInDateLabel = sprintf(JTEXT::_('COM_BOOKINGFORCONNECTOR_MERCHANTS_VIEW_MERCHANTDETAILS_RATING_CHECKINDATE_LABEL'), $jdate->format('F Y'));
}
$location = "";
if ($rating->City != "") {
$location .= $rating->City . ", ";
}
$location .= $rating->Nation;
$t = BFCHelper::convertTotal($rating->Total);
//Reply=<risposte><risposta><![CDATA[Test risposta]]></risposta></risposte>
$reply = "";
$replydateLabel = "";
if (!empty($rating->Reply)) {
示例2: array
if ($sitepress->get_current_language() != $sitepress->get_default_language()) {
$base_url .= "/" . ICL_LANGUAGE_CODE;
}
}
$merchant = $resource->Merchant;
$resource->Price = $resource->MinPrice;
$resourceName = BFCHelper::getLanguage($resource->Name, $language, null, array('ln2br' => 'ln2br', 'striptags' => 'striptags'));
$resourceDescription = BFCHelper::getLanguage($resource->Description, $language, null, array('ln2br' => 'ln2br', 'striptags' => 'striptags'));
$route = '';
$typeName = BFCHelper::getLanguage($resource->CategoryName, $language);
$zone = $resource->LocationZone;
$location = $resource->LocationName;
$contractType = $resource->ContractType ? __('Rent', 'bfi') : __('Sale', 'bfi');
$dateUpdate = BFCHelper::parseJsonDate($resource->AddedOn);
if ($resource->UpdatedOn != '') {
$dateUpdate = BFCHelper::parseJsonDate($resource->UpdatedOn);
}
$resourceLat = null;
$resourceLon = null;
//$resourceLat = get_option('posy_key',null);
//$resourceLon = get_option('posx_key',null);
$startzoom = get_option('startzoom_key', 14);
$googlemapsapykey = get_option('googlemapsapykey_key');
if (!empty($resource->XGooglePos)) {
$resourceLat = $resource->XGooglePos;
}
if (!empty($resource->YGooglePos)) {
$resourceLon = $resource->YGooglePos;
}
if (!empty($resource->XPos)) {
$resourceLat = $resource->XPos;
示例3: sprintf
if ($resource->Price != null && $resource->Price > 0 && isset($resource->IsReservedPrice) && $resource->IsReservedPrice != 1) {
$descriptionHead .= sprintf(JTEXT::_('COM_BOOKINGFORCONNECTOR_VIEWS_ONSELLUNIT_HEAD_DESCRIPTION2'), number_format($resource->Price, 0, ',', '.'));
}
$this->document->setTitle($titleHead);
$this->document->setMetadata('og:title', $titleHead);
$this->document->setDescription($descriptionHead);
$this->document->setMetadata('og:description', $resourceDescription);
$this->document->setMetadata('keywords', $keywordsHead);
$this->document->setMetadata('og:url', $route);
/*--------------- FINE IMPOSTAZIONI SEO----------------------*/
//echo "<pre>";
//echo print_r($resource);
//echo "</pre>";
$dateUpdate = BFCHelper::parseJsonDate($resource->Created);
if ($resource->LastUpdate != '') {
$dateUpdate = BFCHelper::parseJsonDate($resource->LastUpdate);
}
$resourceLat = $resource->XGooglePos;
$resourceLon = $resource->YGooglePos;
$isMapVisible = $resource->IsMapVisible;
$isMapMarkerVisible = $resource->IsMapMarkerVisible;
$showResourceMap = $resourceLat != null && $resourceLon != null && $isMapVisible;
if ($isMapMarkerVisible) {
$htmlmarkerpoint = "&markers=color:blue%7C" . $resourceLat . "," . $resourceLon;
}
//$addressData = $resource->AddressData;
//$merchantAddress = false;
//if ($addressData == '' || $addressData == null || $merchant->MerchantTypeId != 2) {
// $addressData = $merchant->AddressData;
// $merchantAddress = true;
//}
示例4: display
function display($tpl = null, $preparecontent = false)
{
$config = JComponentHelper::getParams('com_bookingforconnector');
$document = JFactory::getDocument();
$language = $document->getLanguage();
$app = JFactory::getApplication();
$sitename = $app->get('sitename');
$item = $this->get('Item');
$state = $this->get('State');
$params = $state->params;
$this->assignRef('document', $document);
$this->assignRef('language', $language);
$this->assignRef('config', $config);
$this->assignRef('sitename', $sitename);
$this->assignRef('item', $item);
// $params = null;
// JModelLegacy::addIncludePath(JPATH_ROOT. DIRECTORY_SEPARATOR .'components' . DIRECTORY_SEPARATOR . 'com_bookingforconnector'. DIRECTORY_SEPARATOR . 'models', 'BookingForConnectorModel');
// $model = JModelLegacy::getInstance('Resource', 'BookingForConnectorModel');
//
// Check for errors.
if (count($errors = $this->get('Errors'))) {
JError::raiseWarning(500, implode("\n", $errors));
return false;
}
$overrideFilters = array();
$toExclude = array();
$requiredOffers = array();
// $parentId = isset($item->CondominiumId) ? $item->CondominiumId : null;
$parentId = null;
$offer = null;
if (!empty($state->params["offerId"])) {
$requiredOffers[] = $state->params["offerId"];
$offer = $this->get('Offer');
}
if (isset($offer) && $offer->HasValidSearch) {
$daySpan = '+' . $offer->MinDuration . ' day';
$dateparsed = BFCHelper::parseJsonDate($offer->FirstAvailableDate, 'Y-m-d');
$overrideFilters['checkin'] = DateTime::createFromFormat('Y-m-d', $dateparsed);
$checkInParsed = clone $overrideFilters['checkin'];
$overrideFilters['checkout'] = $checkInParsed->modify($daySpan);
$overrideFilters['duration'] = $offer->MinDuration;
$params['checkin'] = $overrideFilters['checkin'];
$params['duration'] = $offer->MinDuration;
$params['checkout'] = $overrideFilters['checkout'];
}
$this->assignRef('params', $params);
$alternatRes = BFCHelper::GetAlternateResources(0, 5, null, null, $item->MerchantId, $parentId, false, false, $toExclude, $requiredOffers, $overrideFilters);
if (!isset($alternatRes)) {
$alternatRes = array();
}
$allratePlans = array();
foreach ($alternatRes as $ratePlanStay) {
$rs = $ratePlanStay->RatePlan;
$rs->ResourceId = $ratePlanStay->ResourceId;
$rs->ResName = $ratePlanStay->ResName;
$rs->MinCapacityPaxes = $ratePlanStay->MinPaxes;
$rs->MaxCapacityPaxes = $ratePlanStay->MaxPaxes;
$rs->MrcCategoryName = $ratePlanStay->DefaultLangMrcCategoryName;
$rs->Availability = $ratePlanStay->Availability;
$rs->ImageUrl = $ratePlanStay->ImageUrl;
if ($ratePlanStay != null) {
$rs->CalculatedPricesDetails = json_decode($rs->CalculatedPricesString);
$rs->SelectablePrices = json_decode($rs->CalculablePricesString);
$rs->CalculatedPackages = json_decode($rs->PackagesString);
$rs->DiscountVariation = null;
if (!empty($rs->Discount)) {
$rs->DiscountVariation = $rs->Discount;
}
$rs->SupplementVariation = null;
if (!empty($rs->Supplement)) {
$rs->SupplementVariation = $rs->Supplement;
}
$allVar = json_decode($rs->AllVariationsString);
$rs->Variations = [];
$rs->SimpleDiscountIds = [];
foreach ($allVar as $currVar) {
$rs->Variations[] = $currVar;
$rs->SimpleDiscountIds[] = $currVar->VariationPlanId;
/*
if(empty($currVar->IsExclusive)){
}
*/
}
}
$allratePlans[] = $rs;
}
// echo "<pre>allratePlans";
// echo print_r($allratePlans);
// echo "</pre>";
function cmp($a, $b)
{
return $a->SortOrder - $b->SortOrder;
}
$merchants = array();
$merchants[] = $item->MerchantId;
$criteoConfig = BFCHelper::getCriteoConfiguration(2, $merchants);
usort($allratePlans, "cmp");
$this->assignRef('allstays', $allratePlans);
$analyticsEnabled = $this->checkAnalytics("");
$this->assignRef('analyticsEnabled', $analyticsEnabled);
//.........这里部分代码省略.........
示例5: sendOrder
function sendOrder($formData)
{
$formData['orderType'] = 'a';
$formData['cultureCode'] = $GLOBALS['bfi_lang'];
$customer = RSFormHelper::getCustomerData($formData);
$suggestedStay = json_decode(stripslashes($formData['staysuggested']));
$req = json_decode(stripslashes($formData['stayrequest']), true);
// $suggestedStay = json_decode($_SESSION['search.params']['suggestedstay']);
// $req = array('resourceId' => $_SESSION['search.params']['resourceId'], 'checkin' => $formData['checkin']['date'], 'checkout' =>$formData['checkout']['date'] , 'duration' => $_SESSION['search.params']['duration'], 'paxages' => '['.implode(',', $_SESSION['search.params']['paxages']).']', 'extras' => $_SESSION['search.params']['extras'], 'packages' => $_SESSION['search.params']['packages'], 'pricetype' => $_SESSION['search.params']['pricetype'], 'rateplanId' => $_SESSION['search.params']['rateplanId'], 'state' => 'booking' , 'variationPlanId' => $_SESSION['search.params']['variationPlanId'], 'gotCalculator' => false);
$redirect = $formData['Redirect'];
$redirecterror = $formData['Redirecterror'];
$isgateway = $formData['isgateway'];
$otherData = "paxages:" . str_replace("]", "", str_replace("[", "", $req['paxages'])) . "|" . "checkin_eta_hour:" . $formData['checkin_eta_hour'];
$ccdata = null;
if (RSFormHelper::canAcquireCCData($formData)) {
$ccdata = json_encode(RSFormHelper::getCCardData($formData));
$ccdata = BFCHelper::encrypt($ccdata);
}
$orderData = BFCHelper::prepareOrderData($formData, $customer, $suggestedStay, $otherData, $ccdata);
$orderData['pricetype'] = $req['pricetype'];
// $orderData['label'] = 'developerdemo';
$orderData['label'] = $formData['label'];
$processOrder = null;
/*
if(!empty($isgateway) && ($isgateway =="true" ||$isgateway =="1")){
$processOrder=false;
}
*/
$order = BFCHelper::setOrder($orderData['customerData'], $orderData['suggestedStay'], $orderData['creditCardData'], $orderData['otherNoteData'], $orderData['merchantId'], $orderData['orderType'], $orderData['userNotes'], $orderData['label'], $orderData['cultureCode'], $processOrder, $orderData['pricetype']);
if (empty($order)) {
$order = "";
$redirect = $redirecterror;
}
if (!empty($order)) {
if (!empty($isgateway) && ($isgateway == "true" || $isgateway == "1")) {
wp_redirect(get_site_url() . '/payment/?orderId=' . $order->OrderId);
exit;
} else {
$numAdults = 0;
$persons = explode("|", $suggestedStay->Paxes);
foreach ($persons as $person) {
$totper = explode(":", $person);
$numAdults += (int) $totper[1];
}
$startDate = DateTime::createFromFormat('Y-m-d', BFCHelper::parseJsonDate($order->StartDate, 'Y-m-d'));
$endDate = DateTime::createFromFormat('Y-m-d', BFCHelper::parseJsonDate($order->EndDate, 'Y-m-d'));
$redirect = $redirect . '?act=Order&orderid=' . $order->OrderId . '&merchantid=' . $order->MerchantId . '&OrderType=' . $order->OrderType . '&OrderTypeId=' . $order->OrderTypeId . '&totalamount=' . $order->TotalAmount * 100 . '&startDate=' . $startDate->format('Y-m-d') . '&endDate=' . $endDate->format('Y-m-d') . '&numAdults=' . $numAdults;
wp_redirect($redirect);
exit;
}
}
}
示例6: JDate
$orderid = BFCHelper::decrypt($hashorder);
// controllo se è un ordine numerico
if (is_numeric($orderid)) {
// controllo se esiste già una recensione per quell'ordine altrimenti no la faccio vedere
$ratingCount = BFCHelper::getTotalRatingsByOrderId($orderid);
if ($ratingCount > 0) {
//ordine con già una recensione
$ratingError = 2;
$showForm = false;
} else {
$order = BFCHelper::getSingleOrderFromService($orderid);
// controllo se esiste l'ordine
if (isset($order) && ($order->Status === 5 || $order->Status === 20)) {
$dateCheckin = BFCHelper::parseJsonDate($order->StartDate, 'Y-m-d');
$dateCheckin = new JDate($dateCheckin);
$dateCheckout = BFCHelper::parseJsonDate($order->EndDate, 'Y-m-d');
$dateCheckout = new JDate($dateCheckout);
$expirationjdate = new JDate('now -1 month');
// 3:20 PM, December 1st, 2012
$checkin = $dateCheckin->format('Ym01');
if (($dateCheckout < $expirationjdate || $dateCheckout > $jdate) && !array_key_exists($checkin, $listDateArray)) {
$ratingError = 5;
$showForm = false;
}
$selectdate = false;
$name = BFCHelper::getItem($order->CustomerData, 'nome');
$email = BFCHelper::getItem($order->CustomerData, 'email');
$nation = BFCHelper::getItem($order->CustomerData, 'stato');
$city = BFCHelper::getItem($order->CustomerData, 'citta');
$unitiid = BFCHelper::getItem($order->NotesData, 'idunita', 'unita');
// controllo se l'ordine è riferito a questa risorsa
示例7: array
$adults = array(JHTML::_('select.option', '1', JText::_('1')), JHTML::_('select.option', '2', JText::_('2')), JHTML::_('select.option', '3', JText::_('3')), JHTML::_('select.option', '4', JText::_('4')), JHTML::_('select.option', '5', JText::_('5')), JHTML::_('select.option', '6', JText::_('6')), JHTML::_('select.option', '7', JText::_('7')), JHTML::_('select.option', '8', JText::_('8')));
$children = array(JHTML::_('select.option', '0', JText::_('0')), JHTML::_('select.option', '1', JText::_('1')), JHTML::_('select.option', '2', JText::_('2')), JHTML::_('select.option', '3', JText::_('3')), JHTML::_('select.option', '4', JText::_('4')));
$childrenAges = array(JHTML::_('select.option', '0', JText::_('0')), JHTML::_('select.option', '1', JText::_('1')), JHTML::_('select.option', '2', JText::_('2')), JHTML::_('select.option', '3', JText::_('3')), JHTML::_('select.option', '4', JText::_('4')), JHTML::_('select.option', '5', JText::_('5')), JHTML::_('select.option', '6', JText::_('6')), JHTML::_('select.option', '7', JText::_('7')), JHTML::_('select.option', '8', JText::_('8')), JHTML::_('select.option', '9', JText::_('9')), JHTML::_('select.option', '10', JText::_('10')), JHTML::_('select.option', '11', JText::_('11')), JHTML::_('select.option', '12', JText::_('12')), JHTML::_('select.option', '13', JText::_('13')), JHTML::_('select.option', '14', JText::_('14')), JHTML::_('select.option', '15', JText::_('15')), JHTML::_('select.option', '16', JText::_('16')), JHTML::_('select.option', '17', JText::_('17')));
$seniores = array(JHTML::_('select.option', '0', JText::_('0')), JHTML::_('select.option', '1', JText::_('1')), JHTML::_('select.option', '2', JText::_('2')), JHTML::_('select.option', '3', JText::_('3')), JHTML::_('select.option', '4', JText::_('4')), JHTML::_('select.option', '5', JText::_('5')), JHTML::_('select.option', '6', JText::_('6')), JHTML::_('select.option', '7', JText::_('7')), JHTML::_('select.option', '8', JText::_('8')));
$dateStringCheckin = $checkin->format('d/m/Y');
$dateStringCheckout = $checkout->format('d/m/Y');
$dateStayCheckin = new DateTime();
$dateStayCheckout = new DateTime();
$DiscountedPrice = 0;
$total = 0;
if (!empty($stay)) {
if (!empty($stay->CheckIn)) {
$dateStayCheckin = BFCHelper::parseJsonDate($stay->CheckIn);
}
if (!empty($stay->CheckOut)) {
$dateStayCheckout = BFCHelper::parseJsonDate($stay->CheckOut);
}
$total = (double) $stay->TotalPrice;
if (!empty($stay->DiscountedPrice)) {
$DiscountedPrice = (double) $stay->DiscountedPrice;
}
}
$totalPerson = $nad + $nch + $nse;
//$showQuote = ($stay->DiscountedPrice > 0 || $stayAvailability > 0) && ( ($nad + $nch) <= $resource->MaxCapacityPaxes && ($nad + $nch) >= $resource->MinCapacityPaxes );
$showQuote = $DiscountedPrice > 0 && $stayAvailability > 0 && ($totalPerson <= $resource->MaxCapacityPaxes && $totalPerson >= $resource->MinCapacityPaxes) && $dateStayCheckin == $dateStringCheckin && $dateStayCheckout == $dateStringCheckout;
$checkinId = 'calculator_checkin';
// uniqid('checkin');
$checkoutId = 'calculator_checkout';
//uniqid('checkout');
$totalDiscounted = $DiscountedPrice;
$totalWithVariation = $this->totalWithVariation;
示例8: count
$birthLocation = "";
$parentCrewId = $this->item->CrewId;
$crewId = "";
if (!empty($this->item->Crews)) {
$crew = $this->item->Crews[$currentCrew];
$countCrews = count($this->item->Crews);
$styleVisible = "";
if ($currentCrew >= $countCrews) {
$styleVisible = "none";
}
$firstName = $crew->FirstName;
$lastName = $crew->LastName;
$nation = $crew->Nation;
$gender = $crew->Gender;
if (isset($crew->BirthDate)) {
$birthDate = DateTime::createFromFormat($formatDate, BFCHelper::parseJsonDate($crew->BirthDate, $formatDate));
}
$birthLocation = $crew->BirthLocation;
if (!isset($crewId) || $crewId == null) {
$crewId = 0;
}
$parentCrewId = $crew->ParentCrewId;
$crewId = $crew->CrewId;
}
$nationsList = JHTML::_('select.genericlist', $this->aNationList, 'nation' . $currentCrew, 'class="' . COM_BOOKINGFORCONNECTOR_BOOTSTRAP_COL . '12"', 'value', 'text', $nation);
?>
<div id="divOtherPerson<?php
echo $currentCrew;
?>
" style="display:<?php
示例9:
}
} else {
if (!empty($result->IsActive)) {
$resultOk = true;
} else {
$msg = " Utente non attivo";
}
if (!empty($result->ValidationStart)) {
$validationStart = BFCHelper::parseJsonDate($result->ValidationStart);
if ($validationStart > new JDate('now ')) {
$resultOk = false;
$msg = $msg . " - data inizio validità: " . $validationStart;
}
}
if (!empty($result->ValidationEnd)) {
$validationEnd = BFCHelper::parseJsonDate($result->ValidationEnd);
if ($validationEnd < new JDate('now ')) {
$resultOk = false;
$msg = $msg . " - data fine validità: " . $validationEnd;
}
}
}
// check date validità
/*
if ($result->ValidationStart=(null) ){
$resultOk = true;
}
*/
}
}
// load tooltip behavior
示例10: sendOrder
function sendOrder()
{
$formData = $_POST['form'];
if (empty($formData)) {
}
$customer = RSFormHelper::getCustomerData($formData);
$suggestedStay = json_decode($formData['staysuggested']);
$req = json_decode($formData['stayrequest'], true);
$redirect = $formData['Redirect'];
$redirecterror = $formData['Redirecterror'];
$isgateway = $formData['isgateway'];
// eta persone
$otherData = "paxages:" . str_replace("]", "", str_replace("[", "", implode($req['paxages'], ',')));
$ccdata = null;
if (RSFormHelper::canAcquireCCData($formData)) {
$ccdata = json_encode(RSFormHelper::getCCardData($formData));
$ccdata = BFCHelper::encrypt($ccdata);
// $ccdata = RSFormHelper::getCCardData($formData);
}
$orderData = BFCHelper::prepareOrderData($formData, $customer, $suggestedStay, $otherData, $ccdata);
$orderData['pricetype'] = $req['pricetype'];
$orderData['label'] = $formData['label'];
$processOrder = null;
if (!empty($isgateway) && ($isgateway == "true" || $isgateway == "1")) {
$processOrder = false;
}
$order = BFCHelper::setOrder($orderData['customerData'], $orderData['suggestedStay'], $orderData['creditCardData'], $orderData['otherNoteData'], $orderData['merchantId'], $orderData['orderType'], $orderData['userNotes'], $orderData['label'], $orderData['cultureCode'], $processOrder, $orderData['pricetype']);
if (empty($order)) {
$order = "";
$redirect = $redirecterror;
}
if (!empty($order)) {
if (!empty($isgateway) && ($isgateway == "true" || $isgateway == "1")) {
$redirect = JRoute::_('index.php?view=payment&orderId=' . $order->OrderId);
} else {
$numAdults = 0;
$persons = explode("|", $suggestedStay->Paxes);
foreach ($persons as $person) {
$totper = explode(":", $person);
$numAdults += (int) $totper[1];
}
$startDate = DateTime::createFromFormat('Y-m-d', BFCHelper::parseJsonDate($order->StartDate, 'Y-m-d'));
$endDate = DateTime::createFromFormat('Y-m-d', BFCHelper::parseJsonDate($order->EndDate, 'Y-m-d'));
$redirect = $redirect . '?orderid=' . $order->OrderId . '&merchantid=' . $order->MerchantId . '&totalamount=' . $order->TotalAmount * 100 . '&startDate=' . $startDate->format('Y-m-d') . '&endDate=' . $endDate->format('Y-m-d') . '&numAdults=' . $numAdults;
}
// $urlredirpayment = JRoute::_('index.php?view=payment&orderId=' . $order->OrderId);
// $redirect = JRoute::_('index.php?view=payment&orderId=' . $order->OrderId);
}
// echo json_encode($return);
$app = JFactory::getApplication();
$app->redirect($redirect, false);
$app->close();
}
示例11: pushStay
function pushStay($arr, $resourceid, $resStay, $defaultResource = null)
{
$selected = array_values(array_filter($arr, function ($itm) use($resourceid) {
return $itm->ResourceId == $resourceid;
}));
$index = 0;
if (count($selected) == 0) {
$obj = new stdClass();
$obj->ResourceId = $resourceid;
if (isset($defaultResource) && $defaultResource->ResourceId == $resourceid) {
$obj->MerchantName = $defaultResource->MerchantName;
$obj->MinCapacityPaxes = $defaultResource->MinCapacityPaxes;
$obj->MaxCapacityPaxes = $defaultResource->MaxCapacityPaxes;
$obj->Name = $defaultResource->Name;
$obj->MrcCategoryName = $defaultResource->MerchantCategoryName;
$obj->ImageUrl = $defaultResource->ImageUrl;
$obj->Availability = $defaultResource->Availability;
$obj->Policy = $resStay->Policy;
} else {
$obj->MerchantName = $resStay->MrcName;
$obj->MinCapacityPaxes = $resStay->MinCapacityPaxes;
$obj->MaxCapacityPaxes = $resStay->MaxCapacityPaxes;
$obj->Availability = $resStay->Availability;
$obj->Name = $resStay->ResName;
$obj->MrcCategoryName = $resStay->MrcCategoryName;
$obj->ImageUrl = $resStay->ImageUrl;
$obj->Policy = $resStay->Policy;
}
$obj->RatePlans = array();
//$obj->Policy = $completestay->Policy;
//$obj->Description = $singleRateplan->Description;
$arr[] = $obj;
$index = count($arr) - 1;
} else {
$index = array_search($selected[0], $arr);
//$obj = $selected[0];
}
$rt = new stdClass();
$rt->RatePlanId = $resStay->RatePlanId;
$rt->Name = $resStay->Name;
$rt->RatePlanRefId = isset($resStay->RefId) ? $resStay->RefId : "";
$rt->PercentVariation = $resStay->PercentVariation;
$rt->TotalPrice = 0;
$rt->TotalPriceString = "";
$rt->Days = 0;
$rt->BookingType = $resStay->BookingType;
$rt->IsBookable = $resStay->IsBookable;
$rt->CheckIn = BFCHelper::parseJsonDate($resStay->CheckIn);
$rt->CheckOut = BFCHelper::parseJsonDate($resStay->CheckOut);
$rt->CalculatedPricesDetails = $resStay->CalculatedPricesDetails;
$rt->SelectablePrices = $resStay->SelectablePrices;
$rt->Variations = $resStay->Variations;
$rt->SimpleDiscountIds = implode(',', $resStay->SimpleDiscountIds);
if (!empty($resStay->SuggestedStay->DiscountedPrice)) {
$rt->TotalPrice = (double) $resStay->SuggestedStay->TotalPrice;
$rt->TotalPriceString = BFCHelper::priceFormat((double) $resStay->SuggestedStay->TotalPrice);
$rt->Days = $resStay->SuggestedStay->Days;
$rt->DiscountedPriceString = BFCHelper::priceFormat((double) $resStay->SuggestedStay->DiscountedPrice);
$rt->DiscountedPrice = (double) $resStay->SuggestedStay->DiscountedPrice;
}
$arr[$index]->RatePlans[] = $rt;
return $arr;
}
示例12:
//$route= JRoute::_('index.php?view=orders&checkmode=' . $checkmode);
$order = $this->item->order;
$merchantPayments = $this->item->merchantPayments;
if (isset($this->item->merchantPayment)) {
$merchantPayment = $this->item->merchantPayment;
$paymentSystemId = $merchantPayment->PaymentSystemId;
// $paymentSystemRef = null;
$paymentSystemRef = $merchantPayment->PaymentSystemName;
$actionmode = $this->actionmode;
$hasPayed = $this->hasPayed;
//echo "<pre>";
//echo $actionmode;
//echo "</pre>";
$routeOrderPayed = JRoute::_('index.php?view=orders&actionform=login&checkMode=5&orderid=' . $order->OrderId . '&email=' . BFCHelper::getItem($order->CustomerData, 'email'));
if (COM_BOOKINGFORCONNECTOR_USEEXTERNALUPDATEORDERSYSTEM === "GPDati") {
$dateCheckin = BFCHelper::parseJsonDate($order->StartDate);
$routeOrderPayed = JRoute::_('index.php?view=orders&actionform=login&checkMode=146&externalOrderId=' . $order->ExternalId . '&customerLastname=' . BFCHelper::getItem($order->CustomerData, 'cognome') . '&checkIn=' . $dateCheckin);
}
?>
<?php
if ($actionmode == 'donation') {
?>
<?php
$routeOrderPayed = JRoute::_('index.php?view=orders&actionmode=donation');
//echo "<pre>merchantPayment:<br />";
//echo print_r($merchantPayment);
//echo "</pre>";
if (!empty($paymentSystemRef)) {
echo $this->loadTemplate('payment_' . $paymentSystemRef);
}
?>
示例13: foreach
</td>
<td><?php
echo JTEXT::_('COM_BOOKINGFORCONNECTOR_ORDERS_VIEW_PAYMENTAMOUNT');
?>
</td>
<td><?php
echo JTEXT::_('COM_BOOKINGFORCONNECTOR_ORDERS_VIEW_STATUS');
?>
</td>
</tr>
<?php
foreach ($orderPayments as $orderPayment) {
?>
<?php
$datePaymentDate = BFCHelper::parseJsonDate($orderPayment->PaymentDate);
?>
<tr>
<td><?php
echo $datePaymentDate;
?>
</td>
<td><?php
echo sprintf(JTEXT::_('COM_BOOKINGFORCONNECTOR_ORDERS_VIEW_DEPOSIT_LABEL'), $orderPayment->Value);
?>
</td>
<td>
<?php
if ($orderPayment->Status == 7) {
?>
<?php
示例14: getEndDateByMerchantIdFromService
public function getEndDateByMerchantIdFromService($merchantId = 0)
{
$options = array('path' => $this->urlEndDateByMerchantId, 'data' => array('$format' => 'json', 'merchantId' => $merchantId));
$url = $this->helper->getQuery($options);
$formatDate = 'd/m/Y';
$endDate = date($formatDate);
// returns 09/15/2007
$r = $this->helper->executeQuery($url);
if (isset($r)) {
$res = json_decode($r);
// $dateReturn = $res->d->results ?: $res->d;
if (!empty($res->d->results)) {
$dateReturn = $res->d->results;
} elseif (!empty($res->d)) {
$dateReturn = $res->d;
}
$endDate = BFCHelper::parseJsonDate($dateReturn->GetEndDateByMerchantId, $formatDate);
}
return $endDate;
}
示例15: count
$address = $crew->Address;
$city = $crew->City;
$postalCode = $crew->PostalCode;
$province = $crew->Province;
$source = $crew->Source;
$phone = $crew->Phone;
$newsletterSubscription = $crew->NewsletterSubscription;
$gender = $crew->Gender;
if (isset($crew->BirthDate)) {
$birthDate = DateTime::createFromFormat($formatDate, BFCHelper::parseJsonDate($crew->BirthDate, $formatDate));
}
$birthLocation = $crew->BirthLocation;
$documentId = $crew->DocumentId;
$documentNumber = $crew->DocumentNumber;
if (isset($crew->DocumentDate)) {
$documentDate = DateTime::createFromFormat($formatDate, BFCHelper::parseJsonDate($crew->DocumentDate, $formatDate));
}
$documentRelease = $crew->DocumentRelease;
$plate = $crew->Plate;
//targa
$exported = $crew->Exported;
if (!empty($crew->ChildCrews)) {
$crews = $crew->ChildCrews;
$paxNumber = count($crews);
}
}
$actionform = $this->actionform;
//integer list
$crewslist = JHTML::_('select.integerlist', 0, 10, 1, 'crewslist', null, $paxNumber);
// nation list
$this->aNationList = BFCHelper::parseArrayList(JTEXT::_('COM_BOOKINGFORCONNECTOR_VIEW_CONSTANTS_NATIONSLIST'));