本文整理汇总了PHP中BFCHelper::GetPhoneByMerchantId方法的典型用法代码示例。如果您正苦于以下问题:PHP BFCHelper::GetPhoneByMerchantId方法的具体用法?PHP BFCHelper::GetPhoneByMerchantId怎么用?PHP BFCHelper::GetPhoneByMerchantId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BFCHelper
的用法示例。
在下文中一共展示了BFCHelper::GetPhoneByMerchantId方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: search_availability
function search_availability()
{
bfi_get_locale();
if (!isset($_REQUEST['task'])) {
unset($_SESSION['search.filterparams']);
setSessionFromSubmittedData();
$page = isset($_REQUEST['page']) ? $_REQUEST['page'] : 1;
$num_per_page = 20;
$start = ($page - 1) * $num_per_page;
$searchmodel = new BookingForConnectorModelSearch();
$items = $searchmodel->getItems(false, false, $start);
$items = is_array($items) ? $items : array();
$total = 0;
if (!empty($_SESSION['search.results']) && !empty($_SESSION['search.results']['totalresultcount'])) {
$total = $_SESSION['search.results']['totalresultcount'];
}
$pages = ceil($total / $num_per_page);
$output = '';
$output = $output . '<div id="bfcmerchantlist"><div id="searchitems" rel="' . htmlspecialchars(json_encode($items)) . '"></div>
<div class="resourcetabmenu">
<a class="resources" rel="resources"><i class="fa fa-list-ul"></i> ' . __('List', 'bfi') . '</a><a id="maptab" class="mappa" rel="mappa"> ' . __('Map', 'bfi') . '</a>
</div>
<div class="resourcetabcontainer">
<div id="resources" class="tabcontent">
<div class="com_bookingforconnector-merchantlist">';
echo $output;
$merchant_ids = '';
if ($_SESSION['search.params']['merchantResults']) {
$resource_ids = array();
if (is_array($items)) {
$merchant_ids = array();
foreach ($items as $merchant) {
$merchant_ids[] = $merchant->MerchantId;
}
$merchant_ids = implode(',', $merchant_ids);
}
echo '<div id="idsforajax" rel="' . $merchant_ids . '"></div>';
include 'templates/search-listing.php';
} else {
$resource_ids = array();
foreach ($items as $resource) {
$resource_ids[] = $resource->ResourceId;
}
$resource_ids = implode(',', $resource_ids);
echo '<div id="idsforajax" rel="' . $resource_ids . '"></div>';
include 'templates/search-listing-resources.php';
}
$output = '';
$output = $output . '</div>
</div>
<div id="mappa" class="tabcontent">
<div id="map_canvassearch" class="searchmap" style="width:100%; min-height:400px"></div>
</div>';
$url = $_SERVER['REQUEST_URI'];
$pagination_args = array('base' => $url . '%_%', 'format' => '&page=%#%', 'total' => $pages, 'current' => $page, 'show_all' => false, 'end_size' => 5, 'mid_size' => 2, 'prev_next' => true, 'prev_text' => __('«'), 'next_text' => __('»'), 'type' => 'plain', 'add_args' => false, 'add_fragment' => '');
$paginate_links = paginate_links($pagination_args);
if ($paginate_links) {
echo "<nav class='custom-pagination'>";
// echo "<span class='page-numbers page-num'>Page " . $page . " of " . $numpages . "</span> ";
echo "<span class='page-numbers page-num'>" . __('Page', 'bfi') . " </span> ";
print $paginate_links;
echo "</nav>";
}
$output = $output . "</div></div>";
echo $output;
} else {
$task = $_REQUEST['task'];
if ($task == 'GetMerchantsByIds') {
$lists = $_REQUEST['merchantsId'];
$merchants = BFCHelper::getMerchantsByIds($lists, $GLOBALS['bfi_lang']);
die($merchants);
} else {
if ($task == 'getMerchantGroups') {
$merchantgroups = BFCHelper::getMerchantGroups();
wp_send_json($merchantgroups);
} else {
if ($task == 'GetPhoneByMerchantId') {
$merchantId = $_REQUEST['merchantid'];
$language = $GLOBALS['bfi_lang'];
$phno = BFCHelper::GetPhoneByMerchantId($merchantId, $language);
wp_send_json($phno);
} else {
if ($task == 'GetResourcesByIds') {
$lists = $_REQUEST['resourcesId'];
$language = $GLOBALS['bfi_lang'];
$resources = BFCHelper::GetResourcesByIds($lists, $language);
@header('Content-Type: application/json; charset=' . get_option('blog_charset'));
echo $resources;
die;
} else {
if ($task == 'getmarketinfo') {
$base_url = get_site_url();
$merchant_id = $_REQUEST['merchantId'];
$model = new BookingForConnectorModelMerchantDetails();
$merchant = $model->getItem($merchant_id);
$output = '<div class="com_bookingforconnector_map_merchantdetails" style="display:block;height:150px;overflow:auto; width: 300px;">
<div class="com_bookingforconnector_merchantdetails com_bookingforconnector_merchantdetails-t257">
<h3 style="margin:0;" class="com_bookingforconnector_merchantdetails-name"><a class="com_bookingforconnector_merchantdetails-nameAnchor" href="' . $base_url . '/merchant-details/merchantdetails/' . $merchant->MerchantId . '-' . seoUrl($merchant->Name) . '">' . $merchant->Name . '</a>
<br/><span class="com_bookingforconnector_merchantdetails-rating com_bookingforconnector_merchantdetails-rating' . $merchant->Rating . '">
<span class="com_bookingforconnector_merchantdetails-ratingText">Rating ' . $merchant->Rating . '</span>
//.........这里部分代码省略.........
示例2: GetPhoneByMerchantId
function GetPhoneByMerchantId()
{
$merchantId = JRequest::getVar('merchantid');
$number = JRequest::getVar('n');
$language = JRequest::getVar('language');
$return = BFCHelper::GetPhoneByMerchantId($merchantId, $language, $number);
echo $return;
$app = JFactory::getApplication();
$app->close();
}