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


PHP BFCHelper::getMerchantFromServicebyId方法代码示例

本文整理汇总了PHP中BFCHelper::getMerchantFromServicebyId方法的典型用法代码示例。如果您正苦于以下问题:PHP BFCHelper::getMerchantFromServicebyId方法的具体用法?PHP BFCHelper::getMerchantFromServicebyId怎么用?PHP BFCHelper::getMerchantFromServicebyId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BFCHelper的用法示例。


在下文中一共展示了BFCHelper::getMerchantFromServicebyId方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getResourceFromService

 public function getResourceFromService()
 {
     $params = $this->getState('params');
     $resourceId = $params['resourceId'];
     $resourceIdRef = $params['resourceId'];
     $options = array('path' => sprintf($this->urlResource, $resourceId), 'data' => array('$format' => 'json'));
     $url = $this->helper->getQuery($options);
     $cultureCode = JFactory::getLanguage()->getTag();
     $resource = null;
     $r = $this->helper->executeQuery($url);
     if (isset($r)) {
         $res = json_decode($r);
         //$resource = $res->d->results ?: $res->d;
         if (!empty($res->d->results)) {
             $resource = $res->d->results;
         } elseif (!empty($res->d)) {
             $resource = $res->d;
         }
         $resource->Merchant = BFCHelper::getMerchantFromServicebyId($resource->MerchantId);
         //		$resource->Services = $resource->OnSellUnit->Services;
         if (!empty($resource->ServiceIdList)) {
             $services = BFCHelper::GetServicesByIds($resource->ServiceIdList, $cultureCode);
             $resource->Services = $services;
             if (count($resource->Services) > 0) {
                 $tmpservices = array();
                 foreach ($resource->Services as $service) {
                     $tmpservices[] = $service->Name;
                 }
                 //					$services = implode(', ',$tmpservices);
             }
             $resource->Services = $services;
         }
     }
     return $resource;
 }
开发者ID:Bookingfor,项目名称:joomla-extension-v-2,代码行数:35,代码来源:onsellunit.php

示例2: defined

<?php

/**
 * @package   Bookingforconnector
 * @copyright Copyright (c)2006-2016 Ipertrade
 * @license   GNU General Public License version 3, or later
 */
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$resource = $this->item;
$language = $this->language;
$resource->Merchant = BFCHelper::getMerchantFromServicebyId($resource->MerchantId);
$merchant = $resource->Merchant;
$config = $this->config;
$XGooglePosDef = $config->get('posx', 0);
$YGooglePosDef = $config->get('posy', 0);
$startzoom = $config->get('startzoom', 14);
$googlemapsapykey = $config->get('googlemapskey', '');
if (!empty($resource)) {
    //$merchant = $resource->Merchant;
    //$resourceName = BFCHelper::getLanguage($resource->Name, $this->language);
    $resourceName = BFCHelper::getLanguage($resource->Name, $this->language, null, array('ln2br' => 'ln2br', 'striptags' => 'striptags'));
    $resourceDescription = BFCHelper::getLanguage($resource->Description, $this->language, null, array('ln2br' => 'ln2br', 'striptags' => 'striptags'));
    //$typeName =  BFCHelper::getLanguage($resource->CategoryName, $this->language);
    //$zone = $resource->LocationZone;
    //$location = $resource->LocationName;
    //
    /*---------------IMPOSTAZIONI SEO----------------------*/
    //	$this->document->setTitle($titleHead);
    //	$this->document->setMetadata('og:title', $titleHead);
    //	$this->document->setDescription($descriptionHead);
开发者ID:Bookingfor,项目名称:joomla-extension-v-2,代码行数:31,代码来源:default.php

示例3: array

            $listlocationZones[] = JHTML::_('select.option', $lz);
        }
    }
}
$listsId = array();
$resourceImageUrl = Juri::root() . "components/com_bookingforconnector/assets/images/defaults/default-s6.jpeg";
$merchantLogoUrl = Juri::root() . "components/com_bookingforconnector/assets/images/defaults/default-s1.jpeg";
$resourceLogoPath = BFCHelper::getImageUrlResized('onsellunits', "[img]", 'medium');
$resourceLogoPathError = BFCHelper::getImageUrl('onsellunits', "[img]", 'medium');
$merchantImageUrl = Juri::root() . "components/com_bookingforconnector/assets/images/defaults/default-s6.jpeg";
$merchantLogoUrl = Juri::root() . "components/com_bookingforconnector/assets/images/defaults/default-s6.jpeg";
$merchantLogoPath = BFCHelper::getImageUrlResized('merchant', "[img]", 'logomedium');
$merchantLogoPathError = BFCHelper::getImageUrl('merchant', "[img]", 'logomedium');
$merchantId = $this->params['merchantId'];
if (isset($merchantId) && $merchantId > 0) {
    $merchant = BFCHelper::getMerchantFromServicebyId($merchantId);
    $route = JRoute::_('index.php?option=com_bookingforconnector&view=merchantdetails&merchantId=' . $merchant->MerchantId . ':' . BFCHelper::getSlug($resource->MerchantName));
    ?>
	<h3 class="mod_bookingforconnector_merchantdetails-menuTitle"><a href="<?php 
    echo $route;
    ?>
" class="item"><span class="fn org"><?php 
    echo "";
    ?>
</span></a></h3>
<?php 
}
//-------------------pagina per i l redirect di tutte le risorse in vendita
$db = JFactory::getDBO();
$uri = 'index.php?option=com_bookingforconnector&view=onsellunit';
$db->setQuery('SELECT id FROM #__menu WHERE link LIKE ' . $db->Quote($uri) . ' AND (language=' . $db->Quote($language) . ' OR language=' . $db->Quote('*') . ')  AND published = 1 LIMIT 1');
开发者ID:Bookingfor,项目名称:joomla-extension-v-2,代码行数:31,代码来源:default_resources.php

示例4: getResourceFromService

 public function getResourceFromService()
 {
     $params = $this->getState('params');
     $resourceId = $params['resourceId'];
     $resourceIdRef = $params['resourceId'];
     //		if (empty($language)){
     $language = JFactory::getLanguage()->getTag();
     //		}
     $options = array('path' => $this->urlResource, 'data' => array('$format' => 'json', 'id' => $resourceId, 'cultureCode' => BFCHelper::getQuotedString($language)));
     $url = $this->helper->getQuery($options);
     $resource = null;
     $r = $this->helper->executeQuery($url);
     if (isset($r)) {
         $res = json_decode($r);
         //$resource = $res->d->results ?: $res->d;
         if (!empty($res->d->results)) {
             $resource = $res->d->results;
         } elseif (!empty($res->d)) {
             $resource = $res->d;
         }
     }
     //		if (!isset($resource)) {
     //			$options = array(
     //					'path' => sprintf($this->urlUnit, $resourceId),
     //					'data' => array(
     //						'$format' => 'json',
     //						'$filter' => 'Enabled eq true' /* Tags eq \'extra\' and */,
     //						'$expand' => 'Typology'
     //					)
     //				);
     //			$url = $this->helper->getQuery($options);
     //			$r = $this->helper->executeQuery($url);
     //			$unit = null;
     //
     //			if (isset($r)) { // se non trovo la risorsa cerco l'unit\E0 figlia
     //				$res = json_decode($r);
     ////				$unit = $res->d->results ?: $res->d;
     //				if (!empty($res->d->results)){
     //					$unit = $res->d->results;
     //				}elseif(!empty($res->d)){
     //					$unit = $res->d;
     //				}
     //				$resourceIdRef = $unit->Typology->RefUnit;
     //				$options = array(
     //						'path' => sprintf($this->urlResource, $resourceIdRef),
     //						'data' => array(
     //							'$format' => 'json',
     //							'$expand' => 'Merchant'
     //						)
     //					);
     //				$url = $this->helper->getQuery($options);
     //				$r = $this->helper->executeQuery($url);
     //				if (isset($r)) {
     //					$res = json_decode($r);
     ////					$resource = $res->d->results ?: $res->d;
     //					if (!empty($res->d->results)){
     //						$resource = $res->d->results;
     //					}elseif(!empty($res->d)){
     //						$resource = $res->d;
     //					}
     //				}
     //				if (isset($resource)) {
     //					$resource->ReferenceName = $resource->Name;
     //					$resource->Name = $unit->Name;
     //					$resource->ImageUrl = $unit->ImageUrl;
     //					$resource->ImageData = $unit->ImageData;
     //					$resource->XAltGooglePos = $unit->XAltGooglePos;
     //					$resource->YAltGooglePos = $unit->YAltGooglePos;
     //					//$resource->Description = $unit->Description;
     //					$resource->IsReference = false;
     //					$resource->TypeRef = $resource->TypeRef;
     //				}
     //
     //
     //			}
     //
     //		}else{
     //			$resource->ReferenceName = $resource->Name;
     //			$resource->IsReference = true;
     //		}
     //			$resource->Description = $this->getDescription($resource->ResourceId);
     //		$params['hasRateplans'] = $resource->HasRateplans;
     //		// riassegno i parametri recuperati
     //		$this->setState('params', $params);
     //
     //		//if (!BFCHelper::isRatePlanStay()) { // vecchio metodo...
     //		if(!$resource->HasRateplans){
     //			$resource->Extras =  $this->getExtrasFromService();
     //			$resource->PriceTypes =  $this->getPriceTypesFromService();
     //			$resource->MerchantBookingTypes =  $this->getMerchantBookingTypesFromService();
     //		}
     $resource->Merchant = BFCHelper::getMerchantFromServicebyId($resource->MerchantId);
     return $resource;
 }
开发者ID:Bookingfor,项目名称:joomla-extension-v-2,代码行数:94,代码来源:resource.php


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