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


PHP CurrencyManager::getCurrencyList方法代码示例

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


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

示例1: getCurrenciesList

 /**
  * Return currencies list.
  *
  * @return array Currencies list.
  * @throws SystemException
  * @throws \Bitrix\Main\LoaderException
  */
 public static function getCurrenciesList()
 {
     static $currencies = null;
     if ($currencies === null) {
         $currencies = array();
         if (!\Bitrix\Main\Loader::includeModule('currency')) {
             throw new SystemException("Can't include module \"Currency\"!");
         }
         $currencies = Currency\CurrencyManager::getCurrencyList();
     }
     return $currencies;
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:19,代码来源:helper.php

示例2: getConfigStructure

 protected function getConfigStructure()
 {
     static $handlers = null;
     $initedHandlers = self::getRegisteredHandlers("SID");
     sortByColumn($initedHandlers, array(strtoupper("NAME") => SORT_ASC));
     if ($handlers === null) {
         $handlers = array("" => "");
         foreach ($initedHandlers as $handler) {
             $handlers[$handler["SID"]] = $handler["NAME"] . " [" . $handler["SID"] . "]";
         }
     }
     if (strlen($this->handlerInitParams["SID"]) <= 0 || $this->id <= 0) {
         $result = array("MAIN" => array("TITLE" => Loc::getMessage("SALE_DLVR_HANDL_AUT_HANDLER_SETTINGS"), "DESCRIPTION" => Loc::getMessage("SALE_DLVR_HANDL_AUT_HANDLER_SETTINGS_DSCR"), "ITEMS" => array("SID" => array("TYPE" => "ENUM", "NAME" => Loc::getMessage("SALE_DLVR_HANDL_AUT_HANDLER_CHOOSE"), "OPTIONS" => $handlers, "ONCHANGE" => "top.BX.showWait(); if(this.form.elements['NAME'].value == '') this.form.elements['NAME'].value = this.selectedOptions[0].innerHTML.replace(/\\s*\\[.*\\]/g,''); this.form.submit();"))));
     } else {
         $handler = $this->handlerInitParams["SID"];
         $result = array("MAIN" => array("TITLE" => Loc::getMessage("SALE_DLVR_HANDL_AUT_HANDLER_SETTINGS"), "DESCRIPTION" => Loc::getMessage("SALE_DLVR_HANDL_AUT_HANDLER_SETTINGS_DSCR"), "ITEMS" => array("SID" => array("TYPE" => "DELIVERY_READ_ONLY", "NAME" => Loc::getMessage("SALE_DLVR_HANDL_AUT_HANDLER_CHOOSE"), "VALUE" => $handler, "VALUE_VIEW" => $handlers[$handler]), "DESCRIPTION_INNER" => array("TYPE" => "DELIVERY_READ_ONLY", "NAME" => Loc::getMessage("SALE_DLVR_HANDL_AUT_DESCRIPTION_INNER"), "VALUE" => $this->handlerInitParams["DESCRIPTION_INNER"]))));
     }
     $serviceCurrency = $this->currency;
     if (\Bitrix\Main\Loader::includeModule('currency')) {
         $currencyList = CurrencyManager::getCurrencyList();
         if (isset($currencyList[$this->currency])) {
             $serviceCurrency = $currencyList[$this->currency];
         }
         unset($currencyList);
     }
     $marginTypes = array("%" => "%", "CURRENCY" => $serviceCurrency);
     $result["MAIN"]["ITEMS"]["MARGIN_VALUE"] = array("TYPE" => "STRING", "NAME" => Loc::getMessage("SALE_DLVR_HANDL_AUT_MARGIN_VALUE"), "DEFAULT" => 0);
     $result["MAIN"]["ITEMS"]["MARGIN_TYPE"] = array("TYPE" => "ENUM", "NAME" => Loc::getMessage("SALE_DLVR_HANDL_AUT_MARGIN_TYPE"), "DEFAULT" => "%", "OPTIONS" => $marginTypes);
     if (strlen($this->sid) > 0) {
         $configProfileIds = array_keys($this->handlerInitParams["PROFILES"]);
     } else {
         $configProfileIds = array();
     }
     if (isset($this->oldConfig["CONFIG_GROUPS"])) {
         $groupProfileIds = array_keys($this->oldConfig["CONFIG_GROUPS"]);
         $intersect = array_intersect($groupProfileIds, $configProfileIds);
         foreach ($intersect as $pid) {
             unset($this->oldConfig["CONFIG_GROUPS"][$pid]);
         }
     }
     $oldConfig = $this->convertOldConfigToNew($this->oldConfig);
     if (!empty($oldConfig)) {
         if (isset($oldConfig["CONFIG_GROUPS"]["MAIN"])) {
             $oldConfig["CONFIG_GROUPS"]["MAIN_OLD"] = $oldConfig["CONFIG_GROUPS"]["MAIN"];
             unset($oldConfig["CONFIG_GROUPS"]["MAIN"]);
         }
         $result = array_merge($result, $oldConfig);
     }
     return $result;
 }
开发者ID:Satariall,项目名称:izurit,代码行数:50,代码来源:automatic.php

示例3: CheckFields

 public function CheckFields($strAction, &$arFields, $intID = 0)
 {
     global $APPLICATION;
     global $DB;
     global $USER;
     $strAction = strtoupper($strAction);
     if ('UPDATE' != $strAction && 'ADD' != $strAction) {
         return false;
     }
     $intID = (int) $intID;
     $arCurrencyList = Currency\CurrencyManager::getCurrencyList();
     $boolResult = true;
     $arMsg = array();
     $clearFields = array('ID', '~ID', 'UNPACK', '~UNPACK', '~CONDITIONS', 'CONDITIONS', 'USE_COUPONS', '~USE_COUPONS', 'HANDLERS', '~HANDLERS', '~TYPE', '~RENEWAL', '~PRIORITY', '~LAST_DISCOUNT', '~VERSION', 'TIMESTAMP_X', 'DATE_CREATE', '~DATE_CREATE', '~MODIFIED_BY', '~CREATED_BY');
     if ($strAction == 'UPDATE') {
         $clearFields[] = 'CREATED_BY';
     }
     $arFields = array_filter($arFields, 'CCatalogDiscountSave::clearFields');
     foreach ($clearFields as &$fieldName) {
         if (isset($arFields[$fieldName])) {
             unset($arFields[$fieldName]);
         }
     }
     unset($fieldName, $clearFields);
     $arFields['TYPE'] = self::ENTITY_ID;
     $arFields["RENEWAL"] = 'N';
     $arFields['PRIORITY'] = 1;
     $arFields['LAST_DISCOUNT'] = 'Y';
     $arFields['VERSION'] = Catalog\DiscountTable::ACTUAL_VERSION;
     if ((is_set($arFields, "SITE_ID") || $strAction == "ADD") && empty($arFields["SITE_ID"])) {
         $arMsg[] = array('id' => 'SITE_ID', 'text' => Loc::getMessage('BT_MOD_CAT_DSC_SV_ERR_EMPTY_SITE'));
         $boolResult = false;
     } else {
         $rsSites = CSite::GetByID($arFields['SITE_ID']);
         if (!($arSite = $rsSites->Fetch())) {
             $arMsg[] = array('id' => 'SITE_ID', 'text' => Loc::getMessage('BT_MOD_CAT_DSC_SV_ERR_BAD_SITE'));
             $boolResult = false;
         }
     }
     if ((is_set($arFields, "NAME") || $strAction == "ADD") && strlen(trim($arFields["NAME"])) <= 0) {
         $arMsg[] = array('id' => 'NAME', 'text' => Loc::getMessage('BT_MOD_CAT_DSC_SV_ERR_EMPTY_NAME'));
         $boolResult = false;
     }
     if ((is_set($arFields, "ACTIVE") || $strAction == "ADD") && $arFields["ACTIVE"] != "N") {
         $arFields["ACTIVE"] = "Y";
     }
     if ((is_set($arFields, 'SORT') || $strAction == 'ADD') && intval($arFields['SORT']) <= 0) {
         $arFields['SORT'] = 500;
     }
     if ((is_set($arFields, "CURRENCY") || $strAction == "ADD") && empty($arFields["CURRENCY"])) {
         $arMsg[] = array('id' => 'CURRENCY', 'text' => Loc::getMessage('BT_MOD_CAT_DSC_SV_ERR_EMPTY_CURRENCY'));
         $boolResult = false;
     }
     if ((is_set($arFields, "ACTIVE_FROM") || $strAction == "ADD") && !$DB->IsDate($arFields["ACTIVE_FROM"], false, LANGUAGE_ID, "FULL")) {
         $arFields["ACTIVE_FROM"] = false;
     }
     if ((is_set($arFields, "ACTIVE_TO") || $strAction == "ADD") && !$DB->IsDate($arFields["ACTIVE_TO"], false, LANGUAGE_ID, "FULL")) {
         $arFields["ACTIVE_TO"] = false;
     }
     if ((is_set($arFields, 'COUNT_SIZE') || $strAction == 'ADD') && intval($arFields['COUNT_SIZE']) < 0) {
         $arFields['COUNT_SIZE'] = 0;
     }
     if ((is_set($arFields, 'COUNT_TYPE') || $strAction == 'ADD') && !in_array($arFields['COUNT_TYPE'], array('D', 'M', 'Y'))) {
         $arFields['COUNT_TYPE'] = 'Y';
     }
     if ((is_set($arFields, "COUNT_FROM") || $strAction == "ADD") && !$DB->IsDate($arFields["COUNT_FROM"], false, LANGUAGE_ID, "FULL")) {
         $arFields["COUNT_FROM"] = false;
     }
     if ((is_set($arFields, "COUNT_TO") || $strAction == "ADD") && !$DB->IsDate($arFields["COUNT_TO"], false, LANGUAGE_ID, "FULL")) {
         $arFields["COUNT_TO"] = false;
     }
     if (is_set($arFields, 'COUNT_PERIOD')) {
         unset($arFields['COUNT_PERIOD']);
     }
     $strCountPeriod = self::COUNT_TIME_ALL;
     if (is_set($arFields, 'COUNT_SIZE') && intval($arFields['COUNT_SIZE']) > 0) {
         $strCountPeriod = self::COUNT_TIME_PERIOD;
     }
     if (!empty($arFields["COUNT_FROM"]) || !empty($arFields["COUNT_TO"])) {
         $strCountPeriod = self::COUNT_TIME_INTERVAL;
     }
     $arFields['COUNT_PERIOD'] = $strCountPeriod;
     if ((is_set($arFields, 'ACTION_SIZE') || $strAction == 'ADD') && intval($arFields['ACTION_SIZE']) < 0) {
         $arFields['ACTION_SIZE'] = 0;
     }
     if ((is_set($arFields, 'ACTION_TYPE') || $strAction == 'ADD') && !in_array($arFields['ACTION_TYPE'], array('D', 'M', 'Y'))) {
         $arFields['ACTION_TYPE'] = 'Y';
     }
     $intUserID = 0;
     $boolUserExist = CCatalog::IsUserExists();
     if ($boolUserExist) {
         $intUserID = (int) $USER->GetID();
     }
     $strDateFunction = $DB->GetNowFunction();
     $arFields['~TIMESTAMP_X'] = $strDateFunction;
     if ($boolUserExist) {
         if (!array_key_exists('MODIFIED_BY', $arFields) || (int) $arFields["MODIFIED_BY"] <= 0) {
             $arFields["MODIFIED_BY"] = $intUserID;
         }
     }
//.........这里部分代码省略.........
开发者ID:Satariall,项目名称:izurit,代码行数:101,代码来源:discount_save.php

示例4: IncludeModuleLangFile

<?php

/** @global CUser $USER */
use Bitrix\Main;
use Bitrix\Currency;
if ($USER->CanDoOperation('catalog_read') || $USER->CanDoOperation('catalog_price') || $USER->CanDoOperation('catalog_view')) {
    IncludeModuleLangFile($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/catalog/templates/product_edit.php');
    $currencyList = array();
    foreach (Currency\CurrencyManager::getCurrencyList() as $currency => $currencyName) {
        $currencyList[$currency] = array('CURRENCY' => $currency, 'FULL_NAME' => htmlspecialcharsex($currencyName), 'FULL_NAME_JS' => CUtil::JSEscape(htmlspecialcharsbx($currencyName)));
    }
    unset($currency, $currencyName);
    $IBLOCK_ID = (int) $IBLOCK_ID;
    if ($IBLOCK_ID <= 0) {
        return;
    }
    $MENU_SECTION_ID = (int) $MENU_SECTION_ID;
    $PRODUCT_ID = $ID > 0 ? CIBlockElement::GetRealElement($ID) : 0;
    $arBaseProduct = false;
    $periodTimeTypes = array();
    if ($arMainCatalog['SUBSCRIPTION'] == 'Y') {
        $arDefProduct = array('QUANTITY' => '', 'QUANTITY_RESERVED' => '', 'VAT_ID' => 0, 'VAT_INCLUDED' => 'N', 'QUANTITY_TRACE_ORIG' => 'D', 'CAN_BUY_ZERO_ORIG' => 'D', 'PRICE_TYPE' => '', 'RECUR_SCHEME_TYPE' => '', 'RECUR_SCHEME_LENGTH' => '', 'TRIAL_PRICE_ID' => '', 'WITHOUT_ORDER' => '', 'PURCHASING_PRICE' => '', 'PURCHASING_CURRENCY' => '', 'BARCODE_MULTI' => '', 'SUBSCRIBE_ORIG' => 'D');
        $periodTimeTypes = CCatalogProduct::GetTimePeriodTypes(true);
    } else {
        $arDefProduct = array('QUANTITY' => '', 'QUANTITY_RESERVED' => '', 'WEIGHT' => '', 'WIDTH' => '', 'LENGTH' => '', 'HEIGHT' => '', 'MEASURE' => '', 'VAT_ID' => 0, 'VAT_INCLUDED' => 'N', 'QUANTITY_TRACE_ORIG' => 'D', 'CAN_BUY_ZERO_ORIG' => 'D', 'PURCHASING_PRICE' => '', 'PURCHASING_CURRENCY' => '', 'BARCODE_MULTI' => '', 'SUBSCRIBE_ORIG' => 'D');
    }
    if ($PRODUCT_ID > 0) {
        $bReadOnly = !($USER->CanDoOperation('catalog_price') && CIBlockElementRights::UserHasRightTo($IBLOCK_ID, $PRODUCT_ID, "element_edit_price"));
        if ($arMainCatalog['SUBSCRIPTION'] == 'Y') {
            $arProductSelect = array('ID', 'QUANTITY', 'QUANTITY_RESERVED', 'QUANTITY_TRACE_ORIG', 'VAT_ID', 'VAT_INCLUDED', 'CAN_BUY_ZERO_ORIG', 'PRICE_TYPE', 'RECUR_SCHEME_TYPE', 'RECUR_SCHEME_LENGTH', 'TRIAL_PRICE_ID', 'WITHOUT_ORDER', 'PURCHASING_PRICE', 'PURCHASING_CURRENCY', 'BARCODE_MULTI', 'SUBSCRIBE_ORIG', 'TYPE');
        } else {
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:product_edit.php

示例5: foreach

    ?>
&mid=<?php 
    echo $module_id;
    ?>
" name="currency_settings">
	<?php 
    echo bitrix_sessid_post();
    $tabControl->BeginNextTab();
    ?>
<tr>
	<td width="40%"><?php 
    echo Loc::getMessage('BASE_CURRENCY');
    ?>
</td>
	<td width="60%"><select name="BASE_CURRENCY"><?php 
    $currencyList = Currency\CurrencyManager::getCurrencyList();
    if (!empty($currencyList)) {
        foreach ($currencyList as $currency => $title) {
            ?>
<option value="<?php 
            echo $currency;
            ?>
"<?php 
            echo $currency == $baseCurrency ? ' selected' : '';
            ?>
><?php 
            echo htmlspecialcharsex($title);
            ?>
</option><?php 
        }
        unset($title, $currency);
开发者ID:webgksupport,项目名称:alpina,代码行数:31,代码来源:options.php

示例6: array

	);
	$arComponentParameters["PARAMETERS"]['CONVERT_CURRENCY'] = array(
		'PARENT' => 'PRICES',
		'NAME' => GetMessage('CP_BCS_CONVERT_CURRENCY'),
		'TYPE' => 'CHECKBOX',
		'DEFAULT' => 'N',
		'REFRESH' => 'Y',
	);

	if (isset($arCurrentValues['CONVERT_CURRENCY']) && $arCurrentValues['CONVERT_CURRENCY'] == 'Y')
	{
		$arComponentParameters['PARAMETERS']['CURRENCY_ID'] = array(
			'PARENT' => 'PRICES',
			'NAME' => GetMessage('CP_BCS_CURRENCY_ID'),
			'TYPE' => 'LIST',
			'VALUES' => Currency\CurrencyManager::getCurrencyList(),
			'DEFAULT' => Currency\CurrencyManager::getBaseCurrency(),
			"ADDITIONAL_VALUES" => "Y",
		);
	}
}

if (empty($offers))
{
	unset($arComponentParameters["PARAMETERS"]["OFFERS_FIELD_CODE"]);
	unset($arComponentParameters["PARAMETERS"]["OFFERS_PROPERTY_CODE"]);
	unset($arComponentParameters["PARAMETERS"]["OFFERS_SORT_FIELD"]);
	unset($arComponentParameters["PARAMETERS"]["OFFERS_SORT_ORDER"]);
	unset($arComponentParameters["PARAMETERS"]["OFFERS_SORT_FIELD2"]);
	unset($arComponentParameters["PARAMETERS"]["OFFERS_SORT_ORDER2"]);
}
开发者ID:nycmic,项目名称:bittest,代码行数:31,代码来源:.parameters.php

示例7: array

$arPrice = array();
if ($catalogIncluded) {
    $arPrice = CCatalogIBlockParameters::getPriceTypesList();
}
$arProperty_UF = array();
$arSProperty_LNS = array();
if ($iblockExists) {
    $arUserFields = $GLOBALS["USER_FIELD_MANAGER"]->GetUserFields("IBLOCK_" . $arCurrentValues["IBLOCK_ID"] . "_SECTION");
    foreach ($arUserFields as $FIELD_NAME => $arUserField) {
        $arProperty_UF[$FIELD_NAME] = $arUserField["LIST_COLUMN_LABEL"] ? $arUserField["LIST_COLUMN_LABEL"] : $FIELD_NAME;
        if ($arUserField["USER_TYPE"]["BASE_TYPE"] == "string") {
            $arSProperty_LNS[$FIELD_NAME] = $arProperty_UF[$FIELD_NAME];
        }
    }
    unset($arUserFields, $FIELD_NAME, $arUserField);
}
$arComponentParameters = array("GROUPS" => array("PRICES" => array("NAME" => GetMessage("CP_BCSF_PRICES")), "XML_EXPORT" => array("NAME" => GetMessage("CP_BCSF_GROUP_XML_EXPORT"))), "PARAMETERS" => array("SEF_MODE" => array(), "SEF_RULE" => array("VALUES" => array("SECTION_ID" => array("TEXT" => GetMessage("CP_BCSF_SECTION_ID"), "TEMPLATE" => "#SECTION_ID#", "PARAMETER_LINK" => "SECTION_ID", "PARAMETER_VALUE" => '={$_REQUEST["SECTION_ID"]}'), "SECTION_CODE" => array("TEXT" => GetMessage("CP_BCSF_SECTION_CODE"), "TEMPLATE" => "#SECTION_CODE#", "PARAMETER_LINK" => "SECTION_CODE", "PARAMETER_VALUE" => '={$_REQUEST["SECTION_CODE"]}'), "SECTION_CODE_PATH" => array("TEXT" => GetMessage("CP_BCSF_SECTION_CODE_PATH"), "TEMPLATE" => "#SECTION_CODE_PATH#", "PARAMETER_LINK" => "SECTION_CODE_PATH", "PARAMETER_VALUE" => '={$_REQUEST["SECTION_CODE_PATH"]}'), "SMART_FILTER_PATH" => array("TEXT" => GetMessage("CP_BCSF_SMART_FILTER_PATH"), "TEMPLATE" => "#SMART_FILTER_PATH#", "PARAMETER_LINK" => "SMART_FILTER_PATH", "PARAMETER_VALUE" => '={$_REQUEST["SMART_FILTER_PATH"]}'))), "IBLOCK_TYPE" => array("PARENT" => "DATA_SOURCE", "NAME" => GetMessage("CP_BCSF_IBLOCK_TYPE"), "TYPE" => "LIST", "ADDITIONAL_VALUES" => "Y", "VALUES" => $arIBlockType, "REFRESH" => "Y"), "IBLOCK_ID" => array("PARENT" => "DATA_SOURCE", "NAME" => GetMessage("CP_BCSF_IBLOCK_ID"), "TYPE" => "LIST", "ADDITIONAL_VALUES" => "Y", "VALUES" => $arIBlock, "REFRESH" => "Y"), "SECTION_ID" => array("PARENT" => "DATA_SOURCE", "NAME" => GetMessage("CP_BCSF_SECTION_ID"), "TYPE" => "STRING", "DEFAULT" => '={$_REQUEST["SECTION_ID"]}'), "SECTION_CODE" => array("PARENT" => "DATA_SOURCE", "NAME" => GetMessage("CP_BCSF_SECTION_CODE"), "TYPE" => "STRING", "DEFAULT" => ''), "FILTER_NAME" => array("PARENT" => "DATA_SOURCE", "NAME" => GetMessage("CP_BCSF_FILTER_NAME"), "TYPE" => "STRING", "DEFAULT" => "arrFilter"), "PRICE_CODE" => array("PARENT" => "PRICES", "NAME" => GetMessage("CP_BCSF_PRICE_CODE"), "TYPE" => "LIST", "MULTIPLE" => "Y", "VALUES" => $arPrice), "CACHE_TIME" => array("DEFAULT" => 36000000), "CACHE_GROUPS" => array("PARENT" => "CACHE_SETTINGS", "NAME" => GetMessage("CP_BCSF_CACHE_GROUPS"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y"), "SAVE_IN_SESSION" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("CP_BCSF_SAVE_IN_SESSION"), "TYPE" => "CHECKBOX", "DEFAULT" => "N"), "INSTANT_RELOAD" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("CP_BCSF_INSTANT_RELOAD"), "TYPE" => "CHECKBOX", "DEFAULT" => "N"), "XML_EXPORT" => array("PARENT" => "XML_EXPORT", "NAME" => GetMessage("CP_BCSF_XML_EXPORT"), "TYPE" => "CHECKBOX", "DEFAULT" => "N"), "SECTION_TITLE" => array("PARENT" => "XML_EXPORT", "NAME" => GetMessage("CP_BCSF_SECTION_TITLE"), "TYPE" => "LIST", "MULTIPLE" => "N", "DEFAULT" => "-", "VALUES" => array_merge(array("-" => " ", "NAME" => GetMessage("IBLOCK_FIELD_NAME")), $arSProperty_LNS)), "SECTION_DESCRIPTION" => array("PARENT" => "XML_EXPORT", "NAME" => GetMessage("CP_BCSF_SECTION_DESCRIPTION"), "TYPE" => "LIST", "MULTIPLE" => "N", "DEFAULT" => "-", "VALUES" => array_merge(array("-" => " ", "NAME" => GetMessage("IBLOCK_FIELD_NAME"), "DESCRIPTION" => GetMessage("IBLOCK_FIELD_DESCRIPTION")), $arSProperty_LNS))));
if ($arCurrentValues["SEF_MODE"] == "Y") {
    $arComponentParameters["PARAMETERS"]["SECTION_CODE_PATH"] = array("NAME" => GetMessage("CP_BCSF_SECTION_CODE_PATH"), "TYPE" => "STRING", "DEFAULT" => "");
    $arComponentParameters["PARAMETERS"]["SMART_FILTER_PATH"] = array("NAME" => GetMessage("CP_BCSF_SMART_FILTER_PATH"), "TYPE" => "STRING", "DEFAULT" => "");
}
if ($catalogIncluded) {
    $arComponentParameters["PARAMETERS"]['HIDE_NOT_AVAILABLE'] = array('PARENT' => 'DATA_SOURCE', 'NAME' => GetMessage('CP_BCSF_HIDE_NOT_AVAILABLE'), 'TYPE' => 'CHECKBOX', 'DEFAULT' => 'N');
    $arComponentParameters["PARAMETERS"]['CONVERT_CURRENCY'] = array('PARENT' => 'PRICES', 'NAME' => GetMessage('CP_BCSF_CONVERT_CURRENCY'), 'TYPE' => 'CHECKBOX', 'DEFAULT' => 'N', 'REFRESH' => 'Y');
    if (isset($arCurrentValues['CONVERT_CURRENCY']) && $arCurrentValues['CONVERT_CURRENCY'] == 'Y') {
        $arComponentParameters['PARAMETERS']['CURRENCY_ID'] = array('PARENT' => 'PRICES', 'NAME' => GetMessage('CP_BCSF_CURRENCY_ID'), 'TYPE' => 'LIST', 'VALUES' => Currency\CurrencyManager::getCurrencyList(), 'DEFAULT' => Currency\CurrencyManager::getBaseCurrency(), "ADDITIONAL_VALUES" => "Y");
    }
}
if (empty($arPrice)) {
    unset($arComponentParameters["PARAMETERS"]["PRICE_CODE"]);
}
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:.parameters.php

示例8: getConfigStructure

 protected function getConfigStructure()
 {
     static $profiles = null;
     if ($profiles === null) {
         $profiles = array("" => "");
         foreach ($this->parentHandlerInitParams["PROFILES"] as $profileId => $profileParams) {
             $profiles[$profileId] = $profileParams["TITLE"] . " [" . $profileId . "]";
         }
     }
     $result = array("MAIN" => array("TITLE" => Loc::getMessage("SALE_DLVR_HANDL_AUTP_CONF_MAIN_TITLE"), "DESCRIPTION" => Loc::getMessage("SALE_DLVR_HANDL_AUTP_CONF_MAIN_DESCR"), "ITEMS" => array("PROFILE_ID" => array("TYPE" => "ENUM", "NAME" => Loc::getMessage("SALE_DLVR_HANDL_AUTP_CONF_MAIN_PROFILE_ID"), "OPTIONS" => $profiles, "ONCHANGE" => "top.BX.showWait(); this.form.submit(); /* elements.apply.click();*/"))));
     $serviceCurrency = $this->currency;
     if (\Bitrix\Main\Loader::includeModule('currency')) {
         $currencyList = CurrencyManager::getCurrencyList();
         if (isset($currencyList[$this->currency])) {
             $serviceCurrency = $currencyList[$this->currency];
         }
         unset($currencyList);
     }
     $marginTypes = array("%" => "%", "CURRENCY" => $serviceCurrency);
     $result["MAIN"]["ITEMS"]["MARGIN_VALUE"] = array("TYPE" => "STRING", "NAME" => Loc::getMessage("SALE_DLVR_HANDL_AUT_MARGIN_VALUE"), "DEFAULT" => 0);
     $result["MAIN"]["ITEMS"]["MARGIN_TYPE"] = array("TYPE" => "ENUM", "NAME" => Loc::getMessage("SALE_DLVR_HANDL_AUT_MARGIN_TYPE"), "DEFAULT" => "%", "OPTIONS" => $marginTypes);
     $configProfileIds = array_keys($this->parentHandlerInitParams["PROFILES"]);
     if (strlen($this->profileId) > 0 && in_array($this->profileId, $configProfileIds)) {
         $oldAutoConfig = $this->parentAutomatic->getOldConfig();
         if ($oldAutoConfig && isset($oldAutoConfig["CONFIG_GROUPS"]) && is_array($oldAutoConfig["CONFIG_GROUPS"])) {
             foreach ($oldAutoConfig["CONFIG_GROUPS"] as $key => $groupId) {
                 if ($this->profileId != $groupId) {
                     unset($oldAutoConfig["CONFIG_GROUPS"][$key]);
                 }
             }
             foreach ($oldAutoConfig["CONFIG"] as $key => $params) {
                 if ($this->profileId != $params["CONFIG"]) {
                     unset($oldAutoConfig["CONFIG"][$key]);
                 }
             }
         }
         $oldConfig = Automatic::convertOldConfigToNew($oldAutoConfig);
         if (!empty($oldConfig)) {
             if (isset($oldConfig["CONFIG_GROUPS"]["MAIN"])) {
                 $oldConfig["CONFIG_GROUPS"]["MAIN_OLD"] = $oldConfig["CONFIG_GROUPS"]["MAIN"];
                 unset($oldConfig["CONFIG_GROUPS"]["MAIN"]);
             }
             $result = array_merge($result, $oldConfig);
         }
     }
     return $result;
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:47,代码来源:automatic_profile.php

示例9: SelectBox

 public static function SelectBox($sFieldName, $sValue, $sDefaultValue = '', $bFullName = true, $JavaFunc = '', $sAdditionalParams = '')
 {
     $s = '<select name="' . $sFieldName . '"';
     if ('' != $JavaFunc) {
         $s .= ' onchange="' . $JavaFunc . '"';
     }
     if ('' != $sAdditionalParams) {
         $s .= ' ' . $sAdditionalParams . ' ';
     }
     $s .= '>';
     $s1 = '';
     $found = false;
     $currencyList = Currency\CurrencyManager::getCurrencyList();
     if (!empty($currencyList) && is_array($currencyList)) {
         foreach ($currencyList as $currency => $title) {
             $found = $currency == $sValue;
             $s1 .= '<option value="' . $currency . '"' . ($found ? ' selected' : '') . '>' . ($bFullName ? htmlspecialcharsex($title) : $currency) . '</option>';
         }
     }
     if ('' != $sDefaultValue) {
         $s .= '<option value=""' . ($found ? '' : ' selected') . '>' . htmlspecialcharsex($sDefaultValue) . '</option>';
     }
     return $s . $s1 . '</select>';
 }
开发者ID:akniyev,项目名称:itprom_dobrohost,代码行数:24,代码来源:currency.php

示例10: getConfigStructure

 /**
  * @return array
  * @throws \Exception
  */
 protected function getConfigStructure()
 {
     $currency = $this->currency;
     if (Loader::includeModule('currency')) {
         $currencyList = Currency\CurrencyManager::getCurrencyList();
         if (isset($currencyList[$this->currency])) {
             $currency = $currencyList[$this->currency];
         }
         unset($currencyList);
     }
     return array("MAIN" => array("TITLE" => Loc::getMessage("SALE_DLVR_HANDL_CONF_TITLE"), "DESCRIPTION" => Loc::getMessage("SALE_DLVR_HANDL_CONF_DESCRIPTION"), "ITEMS" => array("CURRENCY" => array("TYPE" => "DELIVERY_READ_ONLY", "NAME" => Loc::getMessage("SALE_DLVR_HANDL_CONF_CURRENCY"), "VALUE" => $this->currency, "VALUE_VIEW" => $currency), "PRICE" => array("TYPE" => "NUMBER", "MIN" => 0, "NAME" => Loc::getMessage("SALE_DLVR_HANDL_CONF_PRICE")), "PERIOD" => array("TYPE" => "DELIVERY_PERIOD", "NAME" => Loc::getMessage("SALE_DLVR_HANDL_CONF_PERIOD_DLV"), "ITEMS" => array("FROM" => array("TYPE" => "NUMBER", "MIN" => 0, "NAME" => ""), "TO" => array("TYPE" => "NUMBER", "MIN" => 0, "NAME" => "&nbsp;-&nbsp;"), "TYPE" => array("TYPE" => "ENUM", "OPTIONS" => array("H" => Loc::getMessage("SALE_DLVR_HANDL_CONF_PERIOD_HOUR"), "D" => Loc::getMessage("SALE_DLVR_HANDL_CONF_PERIOD_DAY"), "M" => Loc::getMessage("SALE_DLVR_HANDL_CONF_PERIOD_MONTH"))))))));
 }
开发者ID:Satariall,项目名称:izurit,代码行数:16,代码来源:configurable.php

示例11: foreach

            $boolPriceInc = true;
        }
    }
    if (is_array($arCatGroup) && !empty($arCatGroup)) {
        foreach ($arCatGroup as &$CatalogGroups) {
            if (in_array("CATALOG_GROUP_" . $CatalogGroups["ID"], $arSelectedFields)) {
                $arFilter["CATALOG_SHOP_QUANTITY_" . $CatalogGroups["ID"]] = 1;
                $boolPriceInc = true;
            }
        }
        unset($CatalogGroups);
    }
    if ($boolPriceInc) {
        $boolSubCurrency = Loader::includeModule('currency');
        if ($boolSubCurrency) {
            $arCurrencyList = array_keys(Currency\CurrencyManager::getCurrencyList());
        }
    }
    unset($boolPriceInc);
}
$arSelectedFieldsMap = array();
foreach ($arSelectedFields as $field) {
    $arSelectedFieldsMap[$field] = true;
}
$measureList = array(0 => ' ');
if (isset($arSelectedFieldsMap['CATALOG_MEASURE'])) {
    $measureIterator = CCatalogMeasure::getList(array(), array(), false, false, array('ID', 'MEASURE_TITLE', 'SYMBOL_RUS'));
    while ($measure = $measureIterator->Fetch()) {
        $measureList[$measure['ID']] = $measure['SYMBOL_RUS'] != '' ? $measure['SYMBOL_RUS'] : $measure['MEASURE_TITLE'];
    }
    unset($measure, $measureIterator);
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:iblock_subelement_list.php

示例12: array

<?php

use Bitrix\Conversion\Config;
use Bitrix\Currency\CurrencyManager;
use Bitrix\Main\Loader;
use Bitrix\Main\Localization\Loc;
Loc::loadMessages($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/options.php');
Loc::loadMessages(__FILE__);
if (!$USER->IsAdmin()) {
    return;
}
$modules = Config::getModules();
// TODO all modules with attributes must be active
unset($modules['conversion'], $modules['abtest'], $modules['sender'], $modules['seo']);
$currency = Config::getBaseCurrency();
if (!(Loader::includeModule('currency') && ($currencies = CurrencyManager::getCurrencyList()))) {
    $currencies = array($currency => $currency);
}
if ($REQUEST_METHOD == 'POST' && strlen($Update . $Apply . $RestoreDefaults) > 0 && check_bitrix_sessid()) {
    if (strlen($RestoreDefaults) > 0) {
        Config::setBaseCurrency(null);
        $currency = Config::getBaseCurrency();
        Config::setModules(array());
        $modules = Config::getModules();
    } else {
        if ($currencies[$_POST['CURRENCY']]) {
            $currency = $_POST['CURRENCY'];
            Config::setBaseCurrency($currency);
        }
        foreach ($modules as $name => $config) {
            $modules[$name]['ACTIVE'] = isset($_POST['MODULE'][$name]['ACTIVE']);
开发者ID:akniyev,项目名称:itprom_dobrohost,代码行数:31,代码来源:options.php

示例13: array

<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
/** @var array $arCurrentValues */
use Bitrix\Main\Loader;
use Bitrix\Currency;
if (!Loader::includeModule('currency')) {
    return;
}
$arComponentParameters = array("PARAMETERS" => array("arrCURRENCY_FROM" => array("NAME" => GetMessage("CURRENCY_FROM"), "TYPE" => "LIST", "MULTIPLE" => "Y", "ADDITIONAL_VALUES" => "N", "VALUES" => Currency\CurrencyManager::getCurrencyList(), "GROUP" => "BASE"), "CURRENCY_BASE" => array("NAME" => GetMessage("CURRENCY_BASE"), "TYPE" => "LIST", "MULTIPLE" => "N", "ADDITIONAL_VALUES" => "N", "VALUES" => Currency\CurrencyManager::getCurrencyList(), "DEFAULT" => Currency\CurrencyManager::getBaseCurrency(), "GROUP" => "BASE"), "RATE_DAY" => array("NAME" => GetMessage("CURRENCY_RATE_DAY"), "TYPE" => "STRING", "GROUP" => "ADDITIONAL_PARAMETERS"), "SHOW_CB" => array("NAME" => GetMessage("T_CURRENCY_CBRF"), "TYPE" => "CHECKBOX", "MULTIPLE" => "N", "DEFAULT" => "N", "ADDITIONAL_VALUES" => "N", "GROUP" => "ADDITIONAL_PARAMETERS"), "CACHE_TIME" => array("DEFAULT" => "86400")));
开发者ID:Satariall,项目名称:izurit,代码行数:12,代码来源:.parameters.php

示例14: getConfigStructure

 /**
  * @return array
  * @throws \Exception
  */
 protected function getConfigStructure()
 {
     $currency = $this->currency;
     if (Loader::includeModule('currency')) {
         $currencyList = CurrencyManager::getCurrencyList();
         if (isset($currencyList[$this->currency])) {
             $currency = $currencyList[$this->currency];
         }
         unset($currencyList);
     }
     $result = array("MAIN" => array("TITLE" => Loc::getMessage("SALE_DLVR_HANDL_SMPL_TAB_MAIN"), "DESCRIPTION" => Loc::getMessage("SALE_DLVR_HANDL_SMPL_TAB_MAIN_DESCR"), "ITEMS" => array("CURRENCY" => array("TYPE" => "DELIVERY_READ_ONLY", "NAME" => Loc::getMessage("SALE_DLVR_HANDL_SMPL_CURRENCY"), "VALUE" => $this->currency, "VALUE_VIEW" => $currency), 0 => array("TYPE" => "NUMBER", "MIN" => 0, "NAME" => Loc::getMessage("SALE_DLVR_HANDL_SMPL_DEFAULT")))));
     foreach (self::getLocationGroups() as $groupId => $groupName) {
         $result["MAIN"]["ITEMS"][$groupId] = array("TYPE" => "NUMBER", "MIN" => 0, "NAME" => $groupName);
     }
     return $result;
 }
开发者ID:webgksupport,项目名称:alpina,代码行数:20,代码来源:simple.php


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