當前位置: 首頁>>代碼示例>>PHP>>正文


PHP eZShopFunctions::preferredCurrencyCode方法代碼示例

本文整理匯總了PHP中eZShopFunctions::preferredCurrencyCode方法的典型用法代碼示例。如果您正苦於以下問題:PHP eZShopFunctions::preferredCurrencyCode方法的具體用法?PHP eZShopFunctions::preferredCurrencyCode怎麽用?PHP eZShopFunctions::preferredCurrencyCode使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在eZShopFunctions的用法示例。


在下文中一共展示了eZShopFunctions::preferredCurrencyCode方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: customSortingSQL

 function customSortingSQL($params)
 {
     $multipriceTableAlias = "mp";
     if (isset($params['table_alias_suffix'])) {
         $multipriceTableAlias .= $params['table_alias_suffix'];
     }
     $sql = array('from' => '', 'where' => '', 'sorting_field' => '');
     $sql['from'] = "ezmultipricedata {$multipriceTableAlias}";
     $and = '';
     if (isset($params['contentobject_attr_id'])) {
         $sql['where'] = "\n                     {$multipriceTableAlias}.contentobject_attr_id = {$params['contentobject_attr_id']}";
         $and = ' AND';
     }
     if (isset($params['contentobject_attr_version'])) {
         $sql['where'] .= "\n                    {$and} {$multipriceTableAlias}.contentobject_attr_version = {$params['contentobject_attr_version']}";
         $and = ' AND';
     }
     if (!isset($params['currency_code'])) {
         $params['currency_code'] = eZShopFunctions::preferredCurrencyCode();
     }
     if ($params['currency_code'] !== false) {
         $sql['where'] .= "\n                    {$and} {$multipriceTableAlias}.currency_code = '{$params['currency_code']}'";
         $and = ' AND';
     }
     $sql['sorting_field'] = "{$multipriceTableAlias}.value";
     return $sql;
 }
開發者ID:legende91,項目名稱:ez,代碼行數:27,代碼來源:ezmultipricetype.php

示例2: fetchPreferredCurrencyCode

    function fetchPreferredCurrencyCode()
    {
        $currency = eZShopFunctions::preferredCurrencyCode();
        $result = array( 'result' => $currency );

        return $result;
    }
開發者ID:sushilbshinde,項目名稱:ezpublish-study,代碼行數:7,代碼來源:ezshopfunctioncollection.php

示例3: isPreferredCurrencyValid

 static function isPreferredCurrencyValid($currencyCode = false)
 {
     $error = eZError::SHOP_OK;
     if ($currencyCode === false) {
         $currencyCode = eZShopFunctions::preferredCurrencyCode();
     }
     $currency = eZCurrencyData::fetch($currencyCode);
     if ($currency) {
         if (!$currency->isActive()) {
             $error = eZError::SHOP_PREFERRED_CURRENCY_INACTIVE;
             eZDebug::writeWarning("Currency '{$currencyCode}' is inactive.", __METHOD__);
         }
     } else {
         $error = eZError::SHOP_PREFERRED_CURRENCY_DOESNOT_EXIST;
         eZDebug::writeWarning("Currency '{$currencyCode}' doesn't exist", __METHOD__);
     }
     return $error;
 }
開發者ID:nfrp,項目名稱:ezpublish,代碼行數:18,代碼來源:ezshopfunctions.php

示例4: preferredCurrencyCode

 function preferredCurrencyCode()
 {
     return eZShopFunctions::preferredCurrencyCode();
 }
開發者ID:legende91,項目名稱:ez,代碼行數:4,代碼來源:ezmultiprice.php


注:本文中的eZShopFunctions::preferredCurrencyCode方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。