本文整理汇总了PHP中BFCHelper::getAddressDataByMerchant方法的典型用法代码示例。如果您正苦于以下问题:PHP BFCHelper::getAddressDataByMerchant方法的具体用法?PHP BFCHelper::getAddressDataByMerchant怎么用?PHP BFCHelper::getAddressDataByMerchant使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BFCHelper
的用法示例。
在下文中一共展示了BFCHelper::getAddressDataByMerchant方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
$comune = $resource->CityName;
$provincia = $resource->RegionName;
if (empty($indirizzo)) {
$indirizzo = $resource->MrcAddress;
$cap = $resource->MrcZipCode;
$comune = $resource->MrcCityName;
$provincia = $resource->MrcRegionName;
}
} else {
$addressData = $resource->AddressData;
$indirizzo = BFCHelper::getItem($addressData, 'indirizzo');
$cap = BFCHelper::getItem($addressData, 'cap');
$comune = BFCHelper::getItem($addressData, 'comune');
$provincia = BFCHelper::getItem($addressData, 'provincia');
}
if (BFCHelper::getAddressDataByMerchant($merchant->MainMerchantCategoryId)) {
if (empty($merchant->AddressData)) {
$indirizzo = $merchant->Address;
$cap = $merchant->ZipCode;
$comune = $merchant->CityName;
$provincia = $merchant->RegionName;
} else {
$addressData = $merchant->AddressData;
$indirizzo = BFCHelper::getItem($addressData, 'indirizzo');
$cap = BFCHelper::getItem($addressData, 'cap');
$comune = BFCHelper::getItem($addressData, 'comune');
$provincia = BFCHelper::getItem($addressData, 'provincia');
}
}
$uriMerchant = '';
$route = '';
示例2: accommodationdetails_resource
function accommodationdetails_resource($resource_name)
{
$args = explode('-', $resource_name);
$resource_id = $args[0];
$_SESSION['search.params']['resourceId'] = $resource_id;
$model = new BookingForConnectorModelResource();
$resource = $model->getItem($resource_id);
$merchant_id = $resource->MerchantId;
$modelmerchant = new BookingForConnectorModelMerchantDetails();
$merchant = $modelmerchant->getItem($merchant_id);
$images = array();
if ($resource->ImageUrl != null && $resource->ImageUrl != '') {
$images[] = $resource->ImageUrl;
}
foreach (explode(',', $resource->ImageData) as $image) {
if (!empty($images[0]) && basename($image) != basename($images[0]) && $images[0]) {
$images[] = $image;
}
}
if (!isset($_REQUEST['layout'])) {
ob_start();
include 'templates/resource-gallery.php';
$photos_slider = ob_get_contents();
ob_end_clean();
ob_start();
include 'templates/resource-video.php';
$video_slider = ob_get_contents();
ob_end_clean();
ob_start();
include 'templates/planimetria.php';
$planimetria = ob_get_contents();
ob_end_clean();
$order_type = 'c';
ob_start();
include 'templates/inforequestform.php';
$inforequest = ob_get_contents();
ob_end_clean();
if (!$resource->IsCatalog) {
ob_start();
include 'templates/rate-calculator.php';
$rate_calculator = ob_get_contents();
ob_end_clean();
}
include 'templates/resource.php';
} else {
$merchant = $resource->Merchant;
$resourceLat = 0;
$resourceLon = 0;
$htmlmarkerpoint = '';
if (!empty($resource->XGooglePos) && !empty($resource->YGooglePos)) {
$resourceLat = $resource->XGooglePos;
$resourceLon = $resource->YGooglePos;
}
if (!empty($resource->XPos)) {
$resourceLat = $merchant->XPos;
}
if (!empty($resource->YPos)) {
$resourceLon = $merchant->YPos;
}
if (BFCHelper::getAddressDataByMerchant($merchant->MainMerchantCategoryId)) {
if (!empty($merchant->XGooglePos) && !empty($merchant->YGooglePos)) {
$resourceLat = $merchant->XGooglePos;
$resourceLon = $merchant->YGooglePos;
}
if (!empty($merchant->XPos)) {
$resourceLat = $merchant->XPos;
}
if (!empty($merchant->YPos)) {
$resourceLon = $merchant->YPos;
}
}
$showResourceMap = !empty($resourceLat) && !empty($resourceLon);
if ($showResourceMap) {
$htmlmarkerpoint = "&markers=color:blue%7C" . $resourceLat . "," . $resourceLon;
}
ob_start();
include 'templates/resource-rapidview.php';
$resource_html = ob_get_contents();
ob_end_clean();
wp_send_json(array('mainhtml' => $resource_html, 'htmlmarkerpoint' => $htmlmarkerpoint, 'resourceLon' => $resourceLon, 'title' => $resource->Name));
}
}