当前位置: 首页>>代码示例>>PHP>>正文


PHP BFCHelper::getAddressDataByMerchant方法代码示例

本文整理汇总了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 = '';
开发者ID:Bookingfor,项目名称:drupal-module,代码行数:31,代码来源:resource-rapidview.tpl.php

示例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));
    }
}
开发者ID:Bookingfor,项目名称:wordpress-plugin,代码行数:82,代码来源:bfi.php


注:本文中的BFCHelper::getAddressDataByMerchant方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。